First of all, you need to install your favorite Windows Subsystem for Linux flavor.
For installation steps, see here
To install zsh, you should follow the steps described here.
I'd recommend installing Oh My Zsh too, since it's a great extension for zsh.
- After installing zsh, run
chsh -s $(which zsh)
to switch frombash
tozsh
- Open the
.zshrc
in your preferred editor and addcd ~
as the first line - I'd recommend adding symlinks from
/mnt/c/Users/<your-username>
to~/<your-username>
ln -s /mnt/c/Users/<your-username> ~/<your-username>
- Make sure to use
wsl.exe
and notbash.exe
when opening the WSL terminal again
For those of you who would like to have a nicer terminal experience than the default Windows command line can install Hyper.
To use Hyper with WSL, you just have to change the shell path in the ~/.hyper.js
configuration file
{
shell: 'C:\\Windows\\System32\\wsl.exe',
shellArgs: []
}
If you'd like to have the WSL terminal in VSCode you can add the following line to your user settings:
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\wsl.exe"