The Unix Shell (simple)
A very simple introduction to the unix command line for those who have not used it before.
A command line shell allows you to enter text commands to execute system functions and programs. A large number of different shells are available for unix (sh,bash,bash2,tcsh,csh etc.). When you log on to the white rose grid you will (by default) enter a bash shell, users who are more familiar with other shells an change this default.
The command line basics
If you have followed the tutorial for logging on to the white rose grid, you should now see, at the bottom of the shell screen a prompt: username@pascali$ With a cursor after it.
All shell commands, such as
You enter the command name, followed by any options, followed by the file or files that the command should operate on. Note that the precise syntax varies from command to command. It is important to remember Unix file names and commands are CASE SENSITIVE. myfile and MyFile will be completely different files.
For example, enter:
Most Unix commands have a bewildering and complex array of options, however, as long as you remember the command name, you can get detailed information about the command and it's syntax using the man (manual) command. Try:
To find out more information on man, you can read its man page by entering:
Command completion and history
To make the use of the command line easy, most shells (including the bash shell we use by default) provide command completion and history. To view your command history, you can enter:
Command completion provides a quick way to enter long commands and filenames, to complete a command or filename, press the tab key twice after entering the first few letters. For example, enter
There are an enormous number of useful commands available in the Unix shell. Some important ones are:
Once you are comfortable with logging on to a Unix command line shell, using the command line to enter commands and using man pages to get information on commands, I suggest you move on to the "Unix file system" and "advanced shell" tutorials (in that order).
Please refer to the legal disclaimer covering content on this site.