WSL: Cannot set fish as "default" shell
Your Windows build number: Microsoft Windows [Version 10.0.15063]
What you’re doing and what’s happening: Cannot set fish as default shell
I’ve tried
- C:\Windows\System32\bash.exe ~ -c fish
- C:\Windows\System32\bash.exe ~ -c /usr/bin/fish
When I run Ubuntu on Windows it’s just a blank screen.
What’s wrong / what should be happening instead:
When starting Ubuntu on Windows the default shell right away should be fish
C:\Windows\System32\bash.exe ~ -c /usr/bin/fish works in my other pc. But I forgot at what build I installed wsl (I’m already in the fast ring).
EDIT 1 Trying to reinstall.
EDIT 2 Didn’t help
EDIT 3 Also tried adding
ssh-agent fish
exit
on top of ~/.bashrc as stated here
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 24 (4 by maintainers)
I tried adding
But when I start
Bashit’s just stuck inWelcome to fish, the friendly interactive shellSame result with
If you are using Windows Terminal, you can just pass
fishto wsl.exe as an argument in the ‘Command Line’ option. eg.C:\WINDOWS\system32\wsl.exe -d Ubuntu-20.04 fish. It worked for me 🥳I know this is an old thread, but for those still dealing with this (like me… even on the current Preview version of WSL),
chsh(even withsudo) doesn’t work. @benhillis had mentioned/etc/passwdand editing it directly really has been the solution that works best for me (vs. launchingfishorzshor whatever from somewhere else). Just edit the/etc/passwdfile and change the default shell in there for the user that wantsfish(zsh, etc.) and it works perfectly.I’m now using
zshinstead offish. And I’m using theUbuntufrom the Windows store.chsh -s $(which zsh)worked for me out of the box.@benhillis Uhh. So the part
will respect the default shell in your /etc/passwd file.is not to be worried about, right? Just have to runchsh -c fishand that’s it?