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.
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.
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.
ps
echo $SHELL
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.
|
Name |
Purpose |
|
|---|---|---|
|
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 |
||
|
Name |
Purpose |
|
|---|---|---|
|
logout |
Causes all shells to close, returning you to the login screen. |
|
|
Syntax |
||
|
logout |
||
sh
bash
csh
tcsh
ksh