How to Change Default Shell in macOS Sonoma
If you’re a macOS user, you may have noticed that the default shell, which is the command-line interpreter, is set to ZSH.
While ZSH is powerful and widely used, you might prefer to use a different shell for your daily tasks. In this post, we will explore how to change the default shell in macOS.
Bash: A Modern Shell for macOS
Bash is one of the most popular and powerful user-friendly shell that offers numerous features and customization options.
By default, most older versions of macOS shipped with Bash as the default shell. However, in recent versions, you will find ZSH as the default shell.
To change your shell back to Bash, you can follow the steps as outliend below:
- Open the Terminal application on your Mac.
- Go to the Terminal menu and select “Settings.”
- In the Preferences window, click on the “General” tab.
- Locate the “Shells open with” dropdown menu and select “Command (complete path)”.
- Close the Preferences window.
- Quit and relaunch the Terminal for the changes to take effect.
In the text field next to the dropdown menu, enter /bin/bash
.
Fish: A User-Friendly and Powerful Shell
Fish, short for Friendly Interactive Shell, is another popular alternative to the default Bash shell in macOS. Fish is designed to be easy to use, with a focus on simplicity and discoverability. It features syntax highlighting, auto-completion, and a rich set of built-in functions. To set Fish as your default shell, follow these steps:
Install Fish on your macOS system if you haven’t already done so. You can use package managers like Homebrew or MacPorts for easy installation.
brew install fish
Open the Terminal application on your Mac.
Type fish_config
and press Enter. This command will open the Fish configuration interface in your default web browser.
In the configuration interface, click on the “General” tab.
Click on the “Set Fish as default shell” button.
Close the configuration interface.
Quit and relaunch the Terminal for the changes to take effect.
Conclusion
Changing the default shell in macOS can enhance your productivity and give you a more tailored command-line experience. Whether you choose Zsh, Fish, or another alternative, experimenting with different shells can uncover new features and improve your workflow.