- Both Linux and Unix come with a variety of shells pre-installed. By default, bash (Bourne Again shell), ksh (Korn shell), csh/tcsh (TC shell), sh (Bourne shell), and other shells are installed.
- It should work with the echo or printf commands below:
- echo '$SHELL'
- Please note that $SHELL is the current user's shell, not necessarily the shell that is now running.
- Here's another useful Unix tip. Use the ps command with the -p pid parameter. The command below picks all processes with process ID numbers in pid. To figure out which shell you're in, run the following command:
- ps -p $$
How to identify which shell you are using?
Asked 15-Apr-2022
Viewed 371 times
How to identify which shell you are using?