macOS

How to Change Default Shell in macOS Sonoma

In this post, we will explore how to change the default shell in macOS.
Captain Salem 2 min read
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.

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:

  1. Open the Terminal application on your Mac.
  2. Go to the Terminal menu and select "Settings."
  3. In the Preferences window, click on the "General" tab.
  4. Locate the "Shells open with" dropdown menu and select "Command (complete path)".
  5. In the text field next to the dropdown menu, enter /bin/bash.
  6. Close the Preferences window.
  7. Quit and relaunch the Terminal for the changes to take effect.

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.

Share
Comments
More from GeekBits

Join us at GeekBits

Join our members and get a currated list of awesome articles each month.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to GeekBits.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.