How to set my default shell on Mac?

前端 未结 16 970
抹茶落季
抹茶落季 2020-11-30 16:23

I do not like to retype fish every time I start terminal. I want fish on by default. How can I set fish shell as my default shell on a Mac?

16条回答
  •  野性不改
    2020-11-30 17:09

    On macOS Mojave I had to do the following (using zsh as an example):

    brew install zsh
    sudo sh -c "echo $(which zsh) >> /etc/shells"
    chsh -s $(which zsh)
    

提交回复
热议问题