How to Use zsh as Default in Terminal for Mac OS

Dec 29, 2018 - 5 Comments

Use zsh as Terminal default in Mac OS X

Zsh, or z shell, is a popular shell alternative to bash and tcsh, complete with many improvements and customization options offered through the Oh-My-ZSH project.

If you’d like to use zsh as the default shell in Terminal for Mac OS rather than bash, you can do so rather easily with taking the following steps:

How to Set zsh as Default Shell in Terminal for Mac

  1. Open the Terminal app and pull down the “Terminal” menu, choosing “Preferences”
    • To change all shells to default to zsh:
      • Choose the “General” tab and change “Shells open with:” to “Command (complete path)” and place the following:
      • /bin/zsh/

      Change Terminal default shell to zsh

    • To change a specific profile shell to zsh:
      • Choose the “Profiles” tab and select a profile to adjust from the list (or create a custom one)
      • Go to the “Shell” tab and check “Run command:” and enter “zsh”

      Change a specific profile to zsh

    • Open a new Terminal window or open a new window with the specific profile you set zsh for, you’ll now have zsh as your default

This change to zsh as the default shell will persist between quitting and relaunching Terminal, though any currently active shells or terminal windows would need to refresh or manually enter zsh.

Yes there are other ways to do this, but interestingly enough, specifying a shell to open actually helps to speed up the Terminal app in Mac OS in many cases, so it may offer a performance boost as well (for the record, it doesn’t need to be zsh to get the speed improvement, you can change the default shell to anything available on the Mac for the same effect).

You can also change iTerm, the popular Terminal replacement, to use zsh as the default shell by going to the app Preferences and adjusting Profiles > General > Command to ‘zsh’

Change iTerm shell to zsh as default

Now that you have zsh as your default shell in MacOS or Mac OS X, you may want to take a look at the great oh-my-zsh project at https://github.com/robbyrussell/oh-my-zsh to find themes, functions, and other customizations to bring to zsh.

.

Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS, Tips & Tricks

5 Comments

» Comments RSS Feed

  1. Robert Palmer says:

    I recently updated MacOS to Catalina 10.15.1, and now the initial password slot does not recognize former password. So how do I access Terminal function from this situation showing Peninsular image and login data trough?

    Robert

  2. Liam says:

    I’ve only ever changed shells in System Preferences > Users & Groups;Then ‘Right click on the Users icon’ and change from the drop down menu. I’m I too old for still using the TC Shell?

  3. Joss says:

    I use a Homebrew install of always the latest zsh (/usr/local/bin/zsh) together with prezto (also available on GitHub), which is a fork of oh-my-zsh meant to be cleaner & saner i.a. by using actual zsh syntax. Works like a charm. Couple that with some nice aliases, zsh-completions, and a well-oiled iTerm instead of macOS Terminal, plus Apple’s SF Mono font for your individual theme, and you have imho a great combination that looks and feels fantastic, but still “like Apple”.

    Not sure, though, but I heard that zsh is allegedly not POSIX-compliant. If you want that, i.e. a shell that will enable you to operate on any real Unix system, you’ll still need bash or ksh/mksh. But I don’t really see the need, because zsh seems ubiqitous nowadays: just execute `chsh -s “$(command -v zsh)”` on the other system, and you’re good to go with zsh. The biggest problems you’ll run into on other systems will probably stem from your getting used to your local system’s special functionality & aliases (by prezto or your own making), which won’t work on other systems, of course.

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site