There are several shells you can work on Linux, BASH (Bourne-Again SHell), CSH(C SHell), KSH (Korn SHell) are some of the famous ones. So how you know what is your current SHELL? try the following command in your terminal. echo $SHELL
The CMD variable will tell you what shell the command is executing as, and thus give you the shell you are actually using at that moment in the command line.
Thats actually not a good way to get a shell that your currently under, that only tells what default shell a new user is created with:
ReplyDeleteasamuel@ardi002:~$ egrep ^SHELL /etc/default/useradd
SHELL=/bin/sh
as a proof of concept, i use ZSH as my default shell, so thats the shell i am in. As you will see my shell environment variable still says /bin/sh.
asamuel@ardi002:~$ echo $SHELL
/bin/sh
asamuel@ardi002:~$ getent passwd asamuel
asamuel:x:1002:1002::/home/asamuel:/bin/zsh
And even that still doesn't work 100% because, in my case, it says I'm using /usr/local/bin/tcsh
ReplyDeleteThat file is pointing to /bin/tcsh
But /bin/tcsh *does not exist*
(which is exactly the reason why I am searching an answer to what shell I am running :-/ )
Brother Command to list the all shell please publushh
ReplyDeleteps -p $$
ReplyDeleteThe CMD variable will tell you what shell the command is executing as, and thus give you the shell you are actually using at that moment in the command line.