How to List All the Shells in the macOS – Terminal Method
Before directly jumping towards switching the shells, it’s important to first list all the shells available on your macOS and for that just execute:
How to Switch from Zsh to Bash on macOS – Terminal Method
One way to change the shell in macOS is by using its terminal, so just execute the below-given command and prompt the change by entering the password of your system:
Now just close the terminal and reopen it to apply the changes:
How to Switch from Bash to Zsh on macOS – Terminal Method
To again switch the shell on your macOS then just use the chsh command along with the name of the shell you want to shift previously we shifted the shell to bash and now to switch back to Zsh, execute:
How to Switch from Zsh to Bash on macOS – System Preferences Method
Another way to switch the shell for Zsh to bash is by using the GUI of macOS for that here are some steps that you need to follow:
Step 1: For macOS Catalina (10.15.x) and lower, Open System Preferences and click on Users& Groups:
Step 2: Click on the lock icon and enter the password to modify the settings:
Step 3: Right-click on the user and then open the Advanced Options:
Step 4: In the Advanced Options; from the Login shell drop-down menu, select /bin/bash:
Similarly, to go back to the Zsh from System Preferences, repeat the same procedure, and simply select /bin/zsh.
Further, if you have the latest macOS on your system that is Ventura then below are the steps that you need to follow:
Step 1: In the latest macOS (Ventura) go to System Settings, and click on Users & Groups:
Step 2: Next right click on the user’s name to get the Advanced Options:
Step 3: Enter the password and then from the Login shell, select the desired shell.
Note: macOS X offers various other shells also, such as csh, tcsh which can also be switched from the terminal and System Preferences/System Settings.
Conclusion
Switching between Zsh and bash on macOS can be done quickly and easily using either the terminal or the System Preferences. Both methods are straightforward and can be completed in just a few simple steps. Whether you prefer Zsh or bash, being able to switch between the two shells can help you customize your user experience and make the most of your mac.