How can I configure zsh to be the default shell under Cygwin?
Best Answer
Unless you're using cygwin as a multiuser environment (in which case use chsh as you would under a standard environment.)
Otherwise, you just change cygwin.bat to run zsh -l -i instead of bash --login -i and it will run as a login shell.
Of course, if you want to run multiple shells from startup, just create a set of .bat files to load different shells. (sh, ksh, csh, fish etc)
Update...
I felt I should update this to provide info on doing this without chsh but still doing it on the Unix end. Edit the /etc/passwd file and replace occurrences of /bin/bash with /bin/zsh. (This is effectively what chsh would do, but this way you'd do it for all users in one go.)
Best Answer
Unless you're using cygwin as a multiuser environment (in which case use
chsh
as you would under a standard environment.)Otherwise, you just change cygwin.bat to run
zsh -l -i
instead ofbash --login -i
and it will run as a login shell.Of course, if you want to run multiple shells from startup, just create a set of
.bat
files to load different shells. (sh
,ksh
,csh
,fish
etc)Update...
I felt I should update this to provide info on doing this without
chsh
but still doing it on the Unix end. Edit the/etc/passwd
file and replace occurrences of/bin/bash
with/bin/zsh
. (This is effectively whatchsh
would do, but this way you'd do it for all users in one go.)