What Shell Am I Using? Here's How To Find Out - OSXDaily
Maybe your like
![]()
Ever wondered what shell you are using at the command line? It’s not unusual to want or need to know which shell is running, and though you may hear this question many times, the answer could be different for every user, thus the easiest thing to do is to issue a terminal command which determines the currently active shell.
How to Find What Shell Is Being Used in Mac OS X, Unix, Linux
The easiest way to find out what shell is being used is to type the following command syntax at the command line prompt:
echo $SHELL
Hit Return. Yes, that is $SHELL in all caps, case matters in the unix world. You should see something like this printed back to you, indicating the shell in use:
$ echo $SHELL /bin/bash
This would mean the shell is bash, but you may wind up seeing something differently, like /bin/tcsh /bin/zsh /bin/ksh or a variety of other shells that are out there.
This command works across all unix platforms, whether it’s Mac OS X, Linux, FreeBSD, or whatever, and it’s always reported back the same.
For the vast majority of Mac OS X users, you will be using the Bash shell by default, which is both the standard in all recent versions of OS X and also one of the easier to use shells out there. You can set it to another shell you want rather easily by changing the preferences inside the Mac Terminal, or by using “export $SHELL=” and adjusting it the old fashioned way.
Remember, shells can also be launched from other shells, creating a nest of sorts. For example, you can run tcsh over bash over ksh, though there isn’t much reason to do that. Typing “exit” will quit out of one shell and return to the other if you are in such a situation, where you can then re-run the echo $SHELL command to determine the type again.
- X
- More
- Tumblr
- Telegram
Related
Tag » What Shell Am I Using
-
How Do I Find Out What Shell I Am Using On Linux/Unix? - NixCraft
-
How Do I Check Which Shell I Am Using? - Ask Ubuntu
-
Which Shell Am I Using? How Can I Switch? - Moncef Belyamani
-
Different Ways To Check Which Shell You Are Using On Linux
-
Determine The Current Shell In Linux - Baeldung
-
How To Find Which Shell I Am Using On Linux - Xmodulo
-
How To Determine The Current Interactive Shell That I'm In (command ...
-
How To Find Which Shell Am I Using In Linux [4 Methods]
-
4 Ways To Check Which Shell You Are Using On Linux - LinuxOPsys
-
Bash - Which Shell Am I Running On? - Unix & Linux Stack Exchange
-
How To Tell What Shell Your Mac Is Using - Macinstruct
-
Which Shell Am I Using? - ImagineLinux
-
What Is The Linux Command To Find Out Which Shell You Are Using
-
How Do I Know If I Have Bash Or Zsh? - Linux Hint