Get Available Shells on Linux

Get Available Shells on Linux

A shell is a command-line interpreter that provides access to the operating system. Linux systems can include multiple shells, each offering different features and behavior. Common examples include Bash, Dash, and Zsh. This tutorial demonstrates how to get available shells on Linux.

The /etc/shells file contains paths to login shells installed on the system. Some entries may point to the same shell through symbolic links, while others can represent restricted or specialized environments.

Execute the following command to display the list of available shells:

grep '^/' /etc/shells

Output example:

/bin/sh
/usr/bin/sh
/bin/bash
/usr/bin/bash
/bin/rbash
/usr/bin/rbash
/usr/bin/dash
/usr/bin/screen

Leave a Comment

Cancel reply

Your email address will not be published.