List out all the Shells Using Linux Commands
Last Updated :
19 Apr, 2025
When you're operating out of a Linux environment, the shell is your primary tool for interacting with the OS. It's your command interpreter — it translates what you type into what the OS can interpret and carry out. From basic operations like looking at files to running complex scripts, the shell makes it all possible.
Linux can accommodate other shells beyond its default Bash shell, such as Zsh, Fish, and Dash. They each have different characteristics, performances, and customizability. Bash, for example, scripts robustly, Zsh has excellent auto-suggestions, whereas Fish is suited for beginners.
What Are Linux Shells
A shell in Linux is similar to your computer's "interpreter" – it takes your typed commands (like ls, cd, or mkdir) and interprets them for the operating system to execute. It's mostly how users interact with Linux systems through the command line interface (CLI). Some of the most widely used Linux shells are:
- Bash (Bourne Again Shell) – Most Linux distributions like Ubuntu, Debian, and Fedora's default shell.
- Zsh (Z Shell) – Smart autocompletion and default in macOS.
- Fish (Friendly Interactive Shell) – New, friendly shell with built-in help and syntax highlighting.
For More details refer Different Shells in Linux
In this it displays a list of all valid login shells available on your Linux system and also shows full shell paths like /bin/bash
, /usr/bin/zsh
, etc
Example:
cat /etc/shells
Using 'cat' commandThe list of all the shells which are currently installed in our Linux system is stored in the 'shells' file which is present in /etc folder of the system. It has read-only access by default and is modified automatically whenever we install a new shell in our system. As we can see, the cat command displays the various installed shells along with their installation paths.
Method 2: Use of grep command with Regular Expressions.
It skips all the comment lines (starting with #
) in the /etc/shells
file and only shows the active shells that your system recognizes.
Example:
grep '^[^#]' /etc/shells
Using 'grep' commandMethod 3: Explore the /usr/bin/
Directory
It lists all files in /usr/bin/
ending with “sh and also helpful to see lesser-known shells like dash
, csh
, or any custom ones and also helpful for to see lesser-known shells like dash
, csh
, or any custom ones.
Example:
ls /usr/bin/ | grep 'sh$'
using /usr/bin/Method 4: Use which
to Check Specific Shells
It Tells you the exact installation path of each specified shell (if installed).
which bash zsh fish
using whichShell Comparison Table
Choosing the right shell can improve your productivity, script performance, and overall experience. While Bash is the most widely used shell, alternatives like Zsh, Fish, and Dash offer unique features and use cases.
Shell | Path | Default For | Key Feature |
---|
Bash | /bin/bash | Most Linux distros | Scripting power and POSIX compliance |
Zsh | /usr/bin/zsh | macOS (default shell) | Auto-suggestions, plugin support |
Fish | /usr/bin/fish | Not default on any major OS | User-friendly syntax, smart tab completion |
Dash | /usr/bin/dash | Ubuntu system scripts | Extremely lightweight and fast |
Conclusion
Knowing the various Linux shells that are running on your system puts you in control, flexible, and performing better. From cat /etc/shells to inquiring with which, each facilitates your knowing what shells are enabled and where they reside. Programs such as grep and viewing /usr/bin/ make it simple to look deeper.
Knowing the differences between shells such as Bash, Zsh, Fish, and Dash allows you to choose the appropriate one for your requirements — whether it's automation, usability, or performance. Knowing your environment is the first step towards being more productive on Linux.
Similar Reads
Basic Shell Commands in Linux: Complete List Anyone using Linux should become an expert in the essential shell commands, as they form the backbone of working with the Linux terminal. These commands enable you to navigate the system, manage files, handle processes, and configure settings effectively.The Linux shell serves as an interface for us
5 min read
How to List Running Processes in Linux | ps Command As we all know Linux is a multitasking and multi-user system. So, it allows multiple processes to operate simultaneously without interfering with each other. Process is one of the important fundamental concepts of the Linux OS. A process is an executing instance of a program that carries out differe
10 min read
How to Access All Users in Linux Using Different Commands? Linux allows multiple users with their own custom setting and configuration to work together on the same system, even at the same time. It can even allow a particular user to access several sessions from different locations in order to work on the system. Below is a list of different commands to acc
4 min read
Linux Commands Cheat Sheet Linux, often associated with being a complex operating system primarily used by developers, may not necessarily fit that description entirely. While it can initially appear challenging for beginners, once you immerse yourself in the Linux world, you may find it difficult to return to your previous W
13 min read
Kali Linux - Terminal and Shell Generally, operating systems have 2 interfaces GUI(Graphical User Interface) and CLI(Command Line Interface) and the same is the case with Linux Based Operating Systems. Linux Operating Systems are generally packed with terminal emulator packages for CLI based functioning and Desktop environment pac
3 min read
Useful and time saving bash commands in Linux There are multiple helpful Bash scripts that will make your Linux terminal experience fast and seamless. In Linux, you can automate and execute numerous day-to-day tasks using plain commands â without laying hands on the GUI. These bash script examples assist you in automating file operations, list
5 min read
Linux vs Windows Commands Most of us think that Linux has terminal and we can use a command-line interface only in Linux but it is just a myth. There is a PowerShell and a command prompt in windows as well where we may execute the commands easily. But Windows and Linux have commands with the same name as well. .linux-vs-wind
2 min read
Linux Process Management Command Cheat Sheet On Linux computers there are special commands to control the programs that are running. These commands are called process management commands. With the help of process management commands you can look at the list of the programs that are currently running on your computer. You can also start new pro
6 min read
File System Navigation Commands in Linux Linux offers an alternative to the usual Windows and icons. The terminal might seem different at first, relying on text commands instead of a mouse. Unlike Windows, which relies heavily on a graphical interface, Linux gives you direct access to the core of your computer through text-based commands.A
7 min read
How to List Databases and Tables in PostgreSQL using PSQL PostgreSQL is a powerful, open-source object-relational database system. It provides a wide array of tools and features to manage databases, tables, and other database objects. In this article, we will explain how to list databases and tables in PostgreSQL using the psql command-line interface. We w
3 min read