This is a general brief guide that introduces UNIX at a very basic level.
If you are already familiar with UNIX you only need to inspect the chapter
Logging in
Index
Logging in
Using the WWW browser
Shell
File system navigation
Simple file commands
Viewing and editing files
Manual pages
Supercomputer facilities at Center for Biological Sequence Analysis, Technical University of Denmark
Logging in
The exiercises will be conducted on an SGI Altix 3000 server at CBS, running Linux. You will use SSH to
log in to the server 'organism.cbs.dtu.dk', which is an older SGI Origin server, running IRIX. Your account has been setup
to automatically log you in to the server 'ibiology.cbs.dtu.dk', which is a 64 processor ItaniumII computer,
with 196Gb of shared memory.
The course participants will form groups or work individually. Each group/person will have its/his/her own account - 25 accounts have been created.
The user names are:
stud101, stud102, stud103, stud104, stud105, ...
Logging in to the CBS servers is done as follows:
- Open the program Secure SSH, and start the profile 'organism.cbs.dtu.dk' and provide username and password when promoted.
Shell
There is a special type of window called 'shell' or 'terminal window' that
is similar to an MS-DOS window in Windows. Terminal windows are
the principal vehicle of interaction with a UNIX/Linux machine. Their function is
to perform the commands typed into them.
An active terminal window will display a prompt and pause waiting for a
command. The prompt can look like this:
genome[stud114]:/home/people/stud114/alignment>
It means that you have logged in to the machine called "genome",
your username is "stud114" and you are in the directory (=folder)
"alignment" in the directory "stud114" in the directory
"people" in the directory "home" at the highest level
of the file hierarchy.
The commands are submitted by typing them after the prompt and then hitting
the RETURN key. They may be copied/pasted from another window (see above).
The command you have typed is not submitted until you hit the RETURN key;
you can move back and forth in the command string using the LEFT and RIGHT
arrow keys and correct mistakes quietly. A command line may be longer
than a line on the screen, just keep typing!
As soon as the RETURN key has been hit the execution starts. Do not be
alarmed if nothing happens at once; sometimes it takes a while to load
and activate a programme.
If you are familiar with MS-DOS, please note these differences in
UNIX:
- Commands and file names are case-sensitive: X.AA and
x.aa are two different files.
- Directories in path names are delimited by / (slash),
not \ (backslash).
- There are no drive letters, such as C:.
- Options to commands are normally preceded with a -
(minus), not a / (slash).
File system navigation
The contents of the current directory (=folder) can be examined by typing
'
ls' ("list"). It can look like this:
genome[stud114]:/home/people/stud114/alignment> ls
file1 file2 dir1 dir2
To get more information than just the file names, use '
ls -l' or
the shorthand '
ll' ("list long"). This gives you the
permissions, ownership, size, and last modification time of all the
files.
You can change to a directory
in the current directory with the command 'cd':
genome[stud114]:/home/people/stud114/alignment> cd dir2
genome[stud114]:/home/people/stud114/alignment/dir2>
Notice the the prompt changes as you go to another directory.
To go up one level in the hierarchy, use 'cd ..'. To go to
your home directory, use 'cd' with no arguments:
genome[stud114]:/home/people/stud114/alignment/dir2> cd ..
genome[stud114]:/home/people/stud114/alignment> cd
genome[stud114]:/home/people/stud114>
Wherever you are, '
cd' with no arguments will always take you
to your home directory.
Simple file commands
To copy one or more file(s), use
cp:
cp file newfile
cp file1 file2 etc... directory
To rename a file or move one or more file(s), use
mv:
mv file newfile
mv file1 file2 etc... directory
To delete (remove) one or more file(s), use
rm:
rm file1 file2 etc...
See the
manual pages for details:
man cp
man mv
man rm
Viewing and editing files
Text files
Other files
Files containing graphics can be viewed with many different tools. The choice
of tool depends on the format of the file in question. Most often it is
mentioned in the exercise manual.
Your browser is configured so that it in most cases will launch an
appropriate tool when you view a file (select 'Open file' in the 'File'
menu).
Viewing and saving output from commands
Often, a UNIX command will produce much more output than there is
room for on the the screen at one time. In this case, there are two
things you can do:
Manual pages
Most UNIX commands have
manual pages which are viewed with the
command
man,
e.g. man
align
The manual page for the command will
automatically be piped to
less (see
above).