返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
Windows

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

曦远 (DealiAxy)约 5 分钟
目录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

  1. Open Run, type regedit to launch Registry Editor

  2. Find this folder in the registry \HKEY_CLASSES_ROOT\Directory\Background\shell\

  3. 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

  4. 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 .ico and .exe files

  5. Under WSL Shell Here, create a new key named command, 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 许可协议。转载请注明出处!

相关文章

这是演习:Win10蓝屏,随你召唤

蓝屏似乎是很多IT之家用户不希望看到的东西,虽然在Win10中你还可以扫描屏幕下方二维码参与微软互动赢取大……那个,蓝屏的好处就是为专业人员提供问题信息,比如当前的内存转储,有助于排查和解决问题。当然,可能光是默认蓝屏给出的信息不够,此时可以开启Win10蓝屏详细信息显示。 ▲这二维码居然“上位”了……VM12虚拟机测试结果 微软在Windows10中安排了手动“调取”蓝屏的方式,那就是**按住右

2021-12-18 · Windows · 约 1 分钟

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…