Linux – How to change default shell for Linux susbsystem for Windows

bashshellwindows 10windows-10-v1607windows-subsystem-for-linux

I've installed Linux subsystem for Windows 10. It works fine, but I want to change the default shell environment for the subsystem.

I did sudo apt-get install fish and then chsh -s /usr/bin/fish. But when I start bash.exe in Windows, it always starts the bash (I think it is predictable).

Does anyone know arguments to change this behavior?

Best Answer

You cannot change the default shell per se since the Linux subsystem is started via the bash.exe residing in the system directory.

You can, however, make a new shortcut like the one that already exists for bash and make it run the command

%systemroot%\system32\bash -c /usr/bin/fish

This way you will be running fish immediately.

Related Question