Search code examples
shellcygwinfish

Set Default Shell in Cygwin


I've been using Cygwin for quite a while now. I now want to switch to fish from bash. Everyone is saying that you should use chsh -s /usr/bin/fish, but for some reason, chsh does not work for me. Trying to modify my Cygwin.bat file doesn't work either, and neither does changing my /etc/passwd file.

I really don't understand what's going on. Could someone please help me?


Solution

  • I randomly meet the same problem, and now I providing my solution for you.

    0- Open cygwin by mintty.exe

    1- Build passwd file manually (mkpasswd)

    $mkpasswd > /etc/passwd
    

    2- Change default shell in passwd file

    $vim /etc/passwd
    user:*:1976XX:1971XX:U-user\user,S-1-5-21-XXXX:/home/user:/bin/fish
    

    3- Restart mintty.exe