What shell am I in?

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
/bin/bash

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.

Oracle Shell ScriptingFor more information like this check out my book Oracle Shell Scripting, only $34.95 from Rampant TechPress.

Buy it now!


Oracle Shell Scripting, another review

Another review for my book Oracle Shell Scripting: Linux and UNIX Programming for Oracle has shown up on Amazon!

Prashant wrote:

This book has helped me impress my colleagues and boss..I originally browsed through it at Border’s (and found myself sitting on the ground with a notepad scrambling to copy as much as possible)..of course, then I realized I had to have it, so I bought it online..I knew the publisher was a trustworthy source because I’m always using Don Burleson’s DBA tips online.. this author’s approach is easy-to-follow and concise; yet it’s a thorough guide that is like a catalyst for your own creativity…it has made me look forward to extracting the power of the shell.

It’s a lot better than parsing through thick UNIX encyclopedias or cycling through fragmented online material..as an OCP 10g/9i DBA, I still feel like there are not enough practical day-to-day guides like this one for junior/mid/senior-level administrators, since over half our work is directly/indirectly connected to the shell.

Thanks for the great review Prashant! After all the work that goes into a book like this it’s great to know that it’s helping people. That’s what it’s all about, after all.

Oracle Shell ScriptingFor more information like this check out my book Oracle Shell Scripting, only $34.95 from Rampant TechPress.

Buy it now!