In this article, you will find the required steps to change your default shell from Zsh to Bash on your Mac.
Change Default Shell from Zsh to Bash Mac
To change your default shell from Zsh to Bash on Mac, follow the below-given steps:
Step 1: First, confirm that you are currently using Zsh as your default shell; for that purpose, open your Mac terminal and execute the command given below:
The above output /bin/zsh confirms that Mac is using Zsh as the default shell.
Step 2: Now, to switch from Zsh to Bash, execute the following command:
Step 3: You will be prompted to enter your password, which you have to do so that the password will then be associated with your user account.
Step 4: Close the current terminal session and open the terminal again.
Step 5: To verify that your default shell has been changed to Bash, enter the following command again in the terminal:
The output /bin/bash confirms that you have successfully changed your default shell to Bash.
Optional: Once you have switched to Bash, you can customize its behavior by modifying the .bashrc or .bash_profile files in your user directory. These files allow you to define aliases, set environment variables, and configure various aspects of your Bash shell.
Conclusion
Changing your default shell from Zsh to Bash on your Mac is a simple process that allows you to personalize your command line experience. Though Mac uses the Zsh as a default shell, you can switch it to bash by following the steps outlined in this article. After successfully performing the steps, you can seamlessly switch to Bash and take advantage of its features and customization options.