When you connect to a system, whether directly on the system’s keyboard or through a remote connection you will automatically start in your default shell. The default shell was originally assigned to you when your account was created.
To find out what shell you are currently using we can use the echo command:
$ echo $SHELL
In this command we are using the
echo command to examine the value of the environment variable
$SHELL. This variable was set by the system when we started this command line session and shows the full path to the shell we were assigned at login. Here are some common shells you might see:
/bin/shâ€“ Bourne shell
/bin/bashâ€“ Bourne Again shell
/bin/cshâ€“ C shell
/bin/kshâ€“ Korn shell
/bin/tcshâ€“ TC shell
/bin/zshâ€“ Z shell
Shell binaries are also commonly found in the
/usr/local/bin directory. Consult your system administrator if youâ€™re having trouble finding your shell binaries.