How to change the default shell in Cygwin

bashcygwin;oh-my-zshshellzsh

I am trying to change my default shell from bash to zsh in cygwin.

  1. The normal unix command chsh isn't available on cygwin
  2. The etc/passwd file it seems isn't used anymore in existing versions of cygwin.

So how else can the default shell be changed ?

Best Answer

The answer depends on how you start Cygwin.

If you start Cygwin with Cygwin.bat, modify the last line of /Cygwin.bat (usually C:\cygwin\ or C:\cygwin64\).

If you start Cygwin with mintty, then add the shell as a parameter: mintty /usr/bin/zsh -

Related Question