WSL Tips: Switching to zsh and Adding to the Right-Click Menu
Switching to zsh Notes In Windows Subsystem for Linux, running chsh -s /bin/zsh does not successfully change the default shell to zsh. When opening WSL, the default shell is still bash. This is because WSL does not execute login-related components at startup, and these components are related to the default shell. Microsoft is already aware of this issue, but has no plans to fix it. Method We can
目录6 个章节
Switching to zsh
Notes
In Windows Subsystem for Linux, running chsh -s /bin/zsh does not successfully change the default shell to zsh. When opening WSL, the default shell is still bash. This is because WSL does not execute login-related components at startup, and these components are related to the default shell. Microsoft is already aware of this issue, but has no plans to fix it.
Method
We can use a simple workaround to open zsh at the same time when opening WSL. Add the following to ~/.bashrc
bash -c zsh
References
https://github.com/Microsoft/WSL/issues/477
Adding to the Right-Click Menu
-
Open Run, type
regeditto launch Registry Editor -
Find this folder in the registry
\HKEY_CLASSES_ROOT\Directory\Background\shell\ -
Select the shell folder, right-click to create a new key, double-click the Default value, and change it to
WSL Shell Here; this is the name displayed in the right-click menu -
Add a string value under Default, named
Icon, double-click to change its value to the path of the icon you want, which can be.icoand.exefiles -
Under
WSL Shell Here, create a new key namedcommand, and change this key's Default value to the Ubuntu exe file path; mine is"C:\Windows\System32\bash.exe", note that there should be double quotes on both sides

Ps: Why does today's screenshot look like this = =.. Reason: Out and about. Can only use Windows on my laptop
About

For more interesting tips, follow my WeChat official account: DealiAxy Every article is collected on my blog: blog.deali.cn
_EOF_
WSL Tips: Switching to zsh and Adding to the Right-Click Menu
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
Windows的Linux子系统上配置SSH服务器
安装openssh 这个不用啰嗦太多,首先需要安装openssh-server和openssh-client。 修改sshd-config配置 需要关注的就是这三行。 UsePrivilegeSeparation no #因为wsl没有实现chroot PasswordAuthentication yes ListenAddress 0.0.0.0
2021-12-18 · Windows · 约 1 分钟
修复winget命令找不到的问题
微软官方包管理器winget在Windows 10 1809以上版本中,用于快速安装、更新和管理应用程序。本文介绍了因系统环境变化导致winget命令失效的问题,分析了可能原因,并提供了解决方案及预防措施,包括修复命令、定期更新检查、备份环境变量等。
2025-04-04 · Windows · 约 1 分钟
这是演习:Win10蓝屏,随你召唤
蓝屏似乎是很多IT之家用户不希望看到的东西,虽然在Win10中你还可以扫描屏幕下方二维码参与微软互动赢取大……那个,蓝屏的好处就是为专业人员提供问题信息,比如当前的内存转储,有助于排查和解决问题。当然,可能光是默认蓝屏给出的信息不够,此时可以开启Win10蓝屏详细信息显示。 ▲这二维码居然“上位”了……VM12虚拟机测试结果 微软在Windows10中安排了手动“调取”蓝屏的方式,那就是**按住右
2021-12-18 · Windows · 约 1 分钟
在 Windows 10 上实现免密码 SSH 登录
在日常开发中,SSH(Secure Shell)作为一种安全的远程登录协议,广泛用于 Linux 和 Windows 系统之间的连接。为了提高效率,我们可以通过配置免密码登录,省去每次连接时输入密码的繁琐过程。
2026-08-25 · Windows · 约 1 分钟
讨论
共 0 条加载评论中…