Linux comes with support for multiple flavors of shell, including bash, zsh, ksh, csh, or suchlike. This time I’ll be focusing on how to find out which shell you are using, which is the default one and list of all installed shells.
- Shell environment
Find default shell.
Find the current shell you are working on.
ps -p $$
PID TTY TIME CMD 2167 ttys001 0:00.30 -zsh
List currently installed shells.
/bin/csh /bin/dash /bin/ksh /bin/sh /bin/tcsh /bin/zsh /usr/local/bin/pwsh-preview /usr/local/bin/pwsh
As always, hope this was super handy and if you can think of any other methods to list the current or the default shell environment, please let me know. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.