tip

[Mac] Change default shell script in Mac

November 08, 20191 min read
How to change default shell at mac.

Sometimes you want to change default shell. Someone prefer bash and another person prefer zsh. After Mac OS is updated to Catalina, default shell is changed to zsh. That means, if you already setting your development environment as bash, some setting should changed for zsh or change default to base. Fortunary, changing default shell is very easy in Mac OS.

The command for changing default shell is

chsh -s "SHELL BINARY PATH"

If you want to change default shell to zsh, type this command.

chsh -s /bin/zsh

Change the default shell to bash, type this command.

chsh -s /bin/bash

After type above command, system require your password. Changed default shell is applied when restart terminal.

If you don't know installed shell, can check this command.

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
mac