29
6
I am trying to change my default shell from bash to zsh in cygwin.
- The normal unix command
chsh
isn't available on cygwin - The etc/passwd file it seems isn't used anymore in existing versions of cygwin.
So how else can the default shell be changed ?
2Thank you, I am using Conemu. Had to change the
sh.exe
tozsh.exe
in Conemu Settings > startup > tasks > bash Cygwin Bash >set CHERE_INVOKING=1 & %ConEmuDrive%\CygWin\bin\sh.exe --login -i
– gyaani_guy – 2015-07-14T17:31:33.673@gyaani_guy I am just using ConEmu to execute
CygWin\bin\zsh.exe
.sh.exe --login
will launch Bash, how do you change that? Or does it not matter anyway? I imaginesh.exe --login
is unnecessarily executingsh
beforezsh
... – deed02392 – 2016-10-19T10:10:16.333@deed02392 I am not sure I understand.. but the exact command I am using is
set CHERE_INVOKING=1 & %ConEmuDrive%\CygWin\bin\zsh.exe --login -i
hth – gyaani_guy – 2016-10-19T18:18:11.637@gyaani_guy thanks, I was confused because in your first comment you seemed to imply that you start zsh with
sh.exe
. Now I realise I just didn't read your message correctly :-) – deed02392 – 2016-10-20T09:45:22.2473The mintty example didn't quite work for me. It had issues until I made it a login shell by adding
-l
:mintty.exe -i /Cygwin-Terminal.ico /usr/bin/zsh -l -
– Morgan May – 2016-11-02T03:32:54.373See this answer for a better solution.
– exhuma – 2019-03-14T09:22:22.773This is the only answer that directly allows you to directly pass the
-l
flag tozsh
, so this is the only answer that allows you to have a proper loginzsh
instance started. – mtraceur – 2019-07-03T20:41:29.403