computology.org

The Shell

"The shell" process; processes commands entered using the keyboard and displays the results.

There are various shells that can be used in Linux. Here I talk about the bash shell.

If your using a GUI such as Ubuntu then you just need to start a terminal and you will get a window with a command prompt which ends in a $ for a normal user or a # for a root user, like this;

tom$gold:~$

This prompt tells me that I am on the computer called "gold" in the home directory for the user "tom", that is me. Of course your account name and computer name will probably be different. Each account on any named computer has a directory allocated to it, known as a "home directory".

Things written by the computer are shown like this but things you should enter are shown like this.

Users and Groups

Users can also belong to a group which gives them certain access rights on the system. To find out more about users and groups you can look at the page for Users and Groups.

Which shell am I using?

To find out which shell you are using, type the command echo $SHELL like this;

tom@gold:~$ echo $SHELL

My system responds with;

bin/bash

because it is the "bash" shell, which is the commonest.

echo is one of the commands that you will use a lot.

The Shell Manuals

You can access the Shell Manuals directly from the terminal, which is very useful.

The File System

There are three main types of function the file system provides through the shell;

Environment Variables

The shell allows the storage of string variables called "environment variables" that can be accessed by any program that runs. You can find out more about these here Shell Environment Variables.

One such variable was $SHELL. We used it with echo to see which shell we were using.

Other Shells

Xiki is an interesting evolution of the shell that is perhaps worth a look at.

Find out more about Xiki.