Next Previous Contents

The Shell



Basics on the shell

The shell is the basic program that allows you to interact with the operating system (Linux, in this case). Through the shell you give commands to the computer, and read the output of those commands.

When your account is created you get a shell (logging shell), which in our system is tcsh for most users.

To find out what shell you are running at a given moment execute the command ps.

To find your logging shell type


   ypmatch your-user-name passwd
and look at the end of the output line.

If you want to change your logging shell use the command


   yppasswd -l



Bash

This shell (GNU Bourne-Again SHell) is an sh-compatible shell (sh is the basic UN*X shell). It incorporates nice features from other shells. The files that control the behaviour of bash are .bash_profile, for login shells, and .bashrc for startup file and interactive operations. Commands to be executed while logging out can be written in .bash_logout (all these files are supposed to be in your home directory).

Bash has history (remembers commands and can be recalled and edited). The arrows take you back in the history in the "normal" mode. You can also run bash with vi-like control keys (so you will use Esc and j for going back in the history, for example).

Bash accepts while and for loops in a grammar similar to the C programming language. It also has expansion capabilities, so you can just type the beginning of a file name or a command, and complete it with the Tab key. Functions can be also defined on bash.

Look at the documentation links below for more information.



Tcsh

Tcsh is an enhanced version of the Berkeley UN*X shell. The behaviour of it is determined by the system and the files .tcshrc and .login in your home directory. Commands to be executed when logging out are in the file .logout

Like bash, tcsh has history (recalling and editing commands executed earlier). It also has completion and spelling correction, and a C-like syntax.

Look at the links below from more information.



More information

Here are some examples of the files mentioned above. You should take these files just as examples of how to set up things; I do not promise your account will work nicely (or work at all) if you choose the settings here as the default settings.

Check this links for more information:
Next Previous Contents