Reverting default shell to bash from Zsh in Mac OS Catalina

Carvia Tech | October 23, 2019 | 2 min read | 79 views


In this tutorial we will learn how to revert default shell from Zsh to bash and vice versa in Mac OS Catalina update.
zsh default shell
default shell is Zsh on macOS Catalina

Apple changed default shell from bash to Zsh in macOS Catalina update. In this article we will quickly explore 3 different ways to switch between bash and Zsh shell.

  1. Using command line to change the shell

  2. Using terminal preferences

  3. Using system preferences for a user

Please note that each user account has its own default shell preference, so a single mac installation can have different shells for different users.

List available shells

You can run the below command to list the available shells on your mac OS.

List all shells
cat /etc/shells
Output
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

Switch default shell from Terminal

we can user chsh command from terminal to change a user account’s default shell on macOS.

You can use the below command from terminal to change default shell to Bash:

Change default shell to Bash
chsh -s /bin/bash

system will ask for the password before applying the changes. You will have to close and reopen the terminal for changes to take affect.

To change default shell back to Zsh, run the below command:

chsh -s /bin/zsh

Now the default shell will be Zsh after you close and reopen the terminal window.

Switch shell from Terminal Preferences

You can change default shell using terminal preference, goto

Terminal → Preferences.. → General → Shells open with:

Enter the value as: /bin/bash as shown in the below screenshot.

shell terminal preference

you can add any other entry from the available shells (/bin/zsh, /bin/csh, /bin/bash, /bin/ksh, etc.)

Switch shell from User Account

You can change default shell from User Account settings.

Goto:

System Preferences → Users and Groups → "Click the lock to make the changes" → Select the user account → Hold Ctrl key while clicking on user account on left panel → click advanced options → Login Shell

user account shell

That’s all.


Top articles in this category:
  1. Using Asciidoctor in Java and Spring Boot
  2. how to enable asciimath formula using mathjax in asciidoctorJ
  3. Integrating PayUmoney with your Java Server Side
  4. Asciidoc: How to use nofollow option in asciidoc document
  5. Integrating PayUmoney Webhooks with your Java backend


Find more on this topic:
Misc IT & Integration image
Misc IT & Integration

Misc IT integration topics - Payment Gateways, SMS gateways, Email Servers, Hosting Solutions etc.

Last updated 1 week ago


Recommended books for interview preparation:

This website uses cookies to ensure you get the best experience on our website. more info