UNIX Primer

Home | Primer Home


The Shell

The operating system itself consists mostly of a relatively large program that we call the kernel. The kernel handles all of the important system-wide business and requests from individual users to obtain resources from the computer.

We, as users, interact with the kernel through a program which we call a 'shell.' In UNIX-like systems, we type in a command using the keyboard, hit enter, and a response appears, indicating the results of our actions. We will be using a shell called 'bash' which has a couple of helpful features.

  1. Filename Completion - If you hit the 'tab' key, the shell presents possible filenames based on what you have typed so far. We will come back to this later.
  2. Command Memory - If you use the up and down arrows on your keyboard, you can move back and forth through the commands that you have previously typed. This can save you a lot of time if you find you are typing the same commands repeatedly.

There are many ways to tell what shell you are using. You don't have to understand what these do right now in order to use them. Just type in one of these commands after logging in.

Note that you can run multiple shells at the same time, one on top of the other. However, you will only be able to interact with the most recently run shell (the topmost shell). Below are commands that help you to close your shell once you are finished.

Related Commands:

NamePurpose
exit Causes the current shell to close, returning you to where the shell you are closing was started. If there is no shell below it, you are returned to the login screen.
Syntax
exit

NamePurpose
logout Causes all shells to close, returning you to the login screen.
Syntax
logout

Various shells are available under most of the UNIX-based operating systems. Some of them are:


Designed by D. Kaminsky
Edited by Diana Palsetia
© University of Pennsylvania, 2008