Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bulletinmybeard/c717cc4d5fcc022037c30f55450ed9de to your computer and use it in GitHub Desktop.
Save bulletinmybeard/c717cc4d5fcc022037c30f55450ed9de to your computer and use it in GitHub Desktop.
Change Default Login Shell On MacOS (>=Ventura)

In some cases, the default zsh shell isn't desired or working. Switching temporary or permanent is easily doable. At first, check the currently active shell, list all available shells, and ultimately change the default shell.

Display the path of the currently active shell

~ echo $SHELL
/bin/zsh

List all acceptable shells

~ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
➜  ~

Change the default login shell

~ sudo chsh -s /bin/bash $(whoami)
Changing shell for myuser

Check whether the change was successful

~ echo $SHELL
/bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment