 |
Department of Engineering |
 |
 |
Introduction to the Unix Teaching System
A brief overview of the machines, their
file structure and
the workings of the Unix operating system.
If you're just interested knowing how to use the system, see the
Introduction for New Users
The CUED Teaching System is a collection of about 150
machines which are mostly based on versions of the
Unix
operating system. For flexibility, it's
a distributed system, with much use made of client-server processes.
That is, the machines ask each other for services (computational power
from a compute-server, files from a file-server, etc).
The main machines are as follows
- file-serv is our main file server - the discs containing user files
and big programs are physically attached to it.
You can't log into file-serv - think of it as an external hard drive
- tyrfing, scimitar ... tachi are our main linux servers (they're also known as tw100, etc).
They have their own system discs, but get user files and big
packages from file-serv. They can be logged-into from within the University
- tw101, tw102 ... tw612, tw613 are PCs running linux. They can be
used as computers in their own right, or can be used as terminals to connect
to the linux servers.
- gate is a similar
machine to tyrfing etc, except that it's not
timetabled for undergraduate use. It has
no terminals attached to them, but it can be logged into from
other machines - including machines outside Cambridge University.
- IIA-projects and IIA-projects are the same kind of machines as tyrfing etc.
They're not used for timetabled teaching. They're intended for use by IIA/IIB students and researchers.
- twn01, twn02 ... twn10 (in the DPO)
each have a big screen attached to them. They run Windows, but you can
easily log into other machines from them.
- spanner, rasp,
wrench, cramp, awl, etc are our infrastructure
machines. Under various aliases
they deal with
mail and providing
various services to the system (WWW
services, nameserver facilities, backups). You can't log into them.
It's a good idea to use the advertised alias for the machine providing the service
rather than the current machine name - the alias will work in the future
even if the actual machine providing the service changes.
See
for further information.
There are various flavours of Unix. Our machines all have a similar file structure.
Overall Structure
The Unix file system is one big tree.
- / - the root of the tree
- /bin, /sbin - programs (binaries)
- /lib - libraries
- /etc - System management programs and configuration files.
- /tmp - Temporary space that anyone can use, within reason
- /dev - Files here are interfaces to hardware - printers,
terminals etc.
- /usr/local - where the local stuff goes. It has /bin,
/lib and /etc sub-directories
- /public - Space used for miscellaneous files
- /export - Big packages and things that may be useful to
CUED users in general rather than just Teaching System users.
User files
User files are deeper in the tree. Typing pwd in a terminal
window prints out the
current directory name. Users can use the "cd" command to
wander around the tree (or click on icons if they're running a file manager),
but their access and ability to read/write files is controlled by file
permissions. Files can have Read, Write and Execute permissions which
can be granted to just the user of the file, to a group of users or to
all users. See our Unix groups and file permissions page for details.
Each user is only allowed a certain amount of space. See the
Quota
page for local details.
The term "Program" is used to mean the text the programmer write, the resulting file on disc and the result of "running" that program. The term "process" is
used to mean only the last of these.
Unix is a multi-user and multi-processing operating system (i.e. lots of
people can simultaneously run lots of programs). One way
to get a feel for process activity is to run "top", which
displays a regularly updated 'league table' of running processes
Load averages: 0.31, 0.51, 0.58
174 processes: 172 sleeping, 1 running, 1 zombie
Cpu states:
LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0.31 2.0% 2.0% 2.0% 94.1% 0.0% 0.0% 0.0% 0.0%
Memory: 42392K (14156K) real, 64600K (22828K) virtual, 1096K free
TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
? 811 root 154 20 2376K 1860K sleep 0:11 8.91 8.89 xfs
q8 4999 tpl 189 24 432K 336K run 0:00 17.71 1.69 top
p5 2616 tpl 154 24 6848K 3840K sleep 1:21 0.95 0.95 Mosaic
q8 4043 tpl 154 28 2948K 1352K sleep 0:19 0.90 0.90 emacs
After a few lines of system statistics (note that 174 processes are running),
the top processes are listed. Each process has a unique PID (process
identity number) and is owned by someone. The SIZE column shows how big the process is. Unix works by giving each process a turn at using the CPU. If the piece of
code required isn't
in RAM, Unix finds space for it there.
If a process isn't using the CPU it's usually in a sleeping state.
You can run programs (i.e. start processes) by clicking on their icons or typing their names on the command line. You exit from them by using their Exit button (or sometimes typing "exit"). See the Programs section of the Frequently Asked Questions page for further details.