Reverting default shell to bash from Zsh in Mac OS Catalina

Upasana | October 23, 2019 | 2 min read | 1,176 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. how to enable asciimath formula using mathjax in asciidoctorJ
  2. Asciidoc: How to use nofollow option in asciidoc document
  3. Using Asciidoctor in Java and Spring Boot
  4. 2factor SMS in Spring Boot App
  5. Integrating PayUmoney with your Java Server Side
  6. Integrating PayUmoney Webhooks with your Java backend

Recommended books for interview preparation:

Find more on this topic: