Linux / Unix: How to find list of available shells command line option

Fig.01: How to find list of available shells on Linux or Unix or MacOS?

Fig.01: How to find list of available shells on Linux or Unix or MacOS?

How do you list available shells for use by command-line on Linux or Unix system?

To list available shell, enter the following command at the terminal

cat /etc/shells
Sample outputs:

# 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/ksh
/bin/sh
/bin/tcsh
/bin/zsh
/usr/local/bin/fish
/usr/local/bin/bash

The /etc/shells file contains a list of the shells on the system. For each shell a single line should be present, consisting of the shell’s path, relative to root.

Examples and usage: Change Shell To Bash