How to change default shell to bash on Macos Catalina/Big Sur

https:‮.www//‬lautturi.com
How to change default shell to bash on Macos Catalina/Big Sur

To change the default shell to bash on macOS Catalina or Big Sur, follow these steps:

  1. Open a terminal window.

  2. Check if bash is already installed on your system by running the following command:

which bash

If bash is installed, this command will display the path to the bash executable. If bash is not installed, you will need to install it first. You can do this using the brew package manager:

brew install bash
  1. Add the path to the bash executable to the list of shells in the /etc/shells file. To do this, use the echo command to append the path to the file:
echo $(which bash) | sudo tee -a /etc/shells
  1. Change the default shell for your user account. To do this, use the chsh command and specify the path to the bash executable:
chsh -s $(which bash)
  1. Log out and log back in for the changes to take effect.

After you have logged in again, your default shell will be set to bash.

Created Time:2017-10-16 14:38:44  Author:lautturi