Say I use some Linux operating system. How could I see a list of all the shells that came installed with it (either CLI shells or GUI shells)?

Typing echo $SHELL isn't good for me because it only shows me my current shell (Bash), but what I desire is to list all shells currently installed in the system.

My aim is to have a direct check of all the shells that came with my OS, especially if there are any other beside sh and Bash.

  • The linked thread and others I've seen doesn't give a way to list both CLI shells and GUI shells (an example - Gnome shell or Unity shell). Nov 14 '17 at 9:11
  • This is not a matter of the kernel (so Linux is irrelevant). Nov 14 '17 at 10:16
  • 1
    If you feel a question was closed incorrectly, please open a discussion on Unix & Linux Meta explaining why you feel that way. Flags are only for moderators (users with a ♦ after their name) but closing is usually done by regular users. That said, I'm afraid your question won't be answerable because while they are both called shells and both will provide a way to interact with the machine, they are quite different things and you won't find a list of all graphical and CLI shells like this.You might want to try these questions in /dev/chat.
    – terdon
    Nov 14 '17 at 16:00
chsh -l

chsh allows you to change for a given user but chsh -l simply lists the shell that are available.

If chsh -l isn't supported on your distribution, then cat /etc/shells should achieve the same result.

  • 3
    Or cat /etc/shells Nov 14 '17 at 8:54
  • 1
    chsh: invalid option -- 'l' Nov 14 '17 at 8:56
  • 2
    -l is a valid for util-linux’s chsh (as used in Fedora etc.), not for shadow-utils’ (as used in Debian etc.). Nov 14 '17 at 9:03
  • See superuser.com/a/329479/38062 and observe that the questioner is asking about more than just TUI shells.
    – JdeBP
    Nov 14 '17 at 9:22
  • 1
    Textual User Interface.
    – JdeBP
    Nov 14 '17 at 11:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.