• UNIX was developed in the 70s at AT&T labs by Ken Thompson, and Dennis Ritchie.
• ‘C’ is the language of choice for UNIX, in fact about 90% of UNIX is written in ‘C’.
• UNIX has provided the basis for many simpler operating systems like MS-DOS. Therefore IBM PC users will notice many commands are similar
• Two major releases of UNIX currently popular are AT&T UNIX, and BSD UNIX from Berkeley, these are being replaced by Solaris.
• Popular Concepts
Kernel: A set of hardware services subroutines which talk to all software programs running on the system. This helps provide device independence for programs.
Shell: An interface that accepts user input, executes and tracks user and system programs, executes batch files. Many shells are often run at the same time, this is like having many PC’s available at once.
• A very large supply of public domain software has been developed for UNIX over the last 25 years.
• Most popular languages, and packages are now available for UNIX machines.
• Most computer hardware vendors are making UNIX (or a scaled down version) fit into their computers. Some spin off versions are, SCO UNIX, XENIX, MACH, etc.
• Some of the many features of UNIX are,
Multitasking (many programs at once)
Multi-User (Many users at once)
Networking fully integrated
Shared Resources (disks, printers, etc)
• The features of many UNIX workstations,
Graphics done in hardware
Built in Sound synthesizers
approximately 1 Gig.. local disks for swap space
32 Meg RAM
Virtual memory (uses disk like RAM)
Fully Windowed interface
1.1 Using UNIX Workstations in General
• UNIX is case sensitive, which means don’t confuse upper and lower cases. Almost everything uses lower case.
• You DO NOT TURN OFF OR RESET THESE MACHINES.
• To start using a UNIX system you must identify yourself by entering your login name and your password.. If using telnet you must know the machine name also.
• Use the ‘passwd’ command to change your password. If you use a simple password, it will be easy to find, and somebody will break into your account, and wipe out all of your work. A good rule of thumb is that if it could not be found in a dictionary or index of a book it will generally be safer.
• Don’t be afraid to try something new, you can only wipe out your files, all others are protected.
1.2 Directories, Files, Etc.
• All of the computers in the lab share disks. Your directory will be available at any computer.
• Note: the UNIX slash is ‘\’, not the ‘/’ used on PCs.
• You can use standard UNIX commands to look around, and manipulate your directory, and files,
cd Change directory
pwd Show present working directory
ls List a directory
ls -la List directories in full form
rm remove a file (WARNING DON’T DO THIS IF YOU ARE NOT SURE)
mkdir make a directory
rmdir remove a directory
mv moves a file/directory from the first name to the second
cp copy a file/directory from the first name to the second
more type out the contents of a file
man bring up a manual page for a command
man -k brings up information on a subject
vi a text editor (some commands given below)
‘dd’: delete a line (edit mode)
‘x’: delete a character (edit mode)
‘r’: replace a character (edit mode)
‘R’: replace a string (command mode -> edit mode)
‘a’: append to a line (command mode -> edit mode)
‘i’: insert a string (command mode -> edit mode)
‘:w’: write to a file (command mode)
‘:q’: quit from a file (command mode)
ESC: move from edit to command mode
cursor key: move the cursor
ps -ef Print a list of processes running on the computer
kill -9 Kill a process running on the computer (uses the PID # from ps -ef)
passwd Change your password (protect yourself)
du Check your personal disk usage
df . Check total disk space available
quota -v Check how much quota you have left. Being over quota for a few days will result in your account being cut off automatically.
date get system date and time
who show who is logged into your machine
textedit A mouse based editor
pine A simple interface for mail usage
mail A somewhat bothersome mail tool (see pine).
• You can use wildcards when filenames. The characters used are,
* Any string
? Any Character
.. The directory above
. this directory
~ your home directory
• Some examples of valid wildcard strings are,
Ad* Advertise Advent.not Ad
Ad? Ad. Ade
??e.* ape.exe eee.thisisanother
../hi.* hi.there (in directory above)
~/*.there hi.there (in your home directory)
• There are no real limits to file name lengths, but users should be careful with nonalphabetic characters.
• Files that begin with ‘.’ are often system files (like ‘.login’), and should not be deleted, moved, or created unless you are sure that is what you want to do.
1.3 Advanced Concepts
• Besides the normal keyboard operation, some keys have special meanings. Erasing a character can be done with delete/rubout or backspace /control-h (^h), the actual key varies from machine to machine. Control-s (^s) and control-q (^q) are for flow control, typing a ^s will stop output to the screen, which can then be continued by typing ^q. ^d represents end-of-file, and is used to exit from several programs like mail, or possibly to log off the computer.
• Most workstations run the UNIX operating system, which comes in two varieties: 4.3BSD (Sun) and System V (SGI), whose differences are minor for the average user (except for printing). When one logs into a UNIX system, you are actually running a program (shell) this is in some ways similar to DOS. In the standard shell you are given a prompt, where you type your command. If it is not a built-in command, it searches on the disk according to a user-specified search path, for an executable program of that name. Almost all commands are programs that are run in this manner. There are also executable shell scripts, similar to command files on DOS. UNIX is limited to running a program of a size equal to the sum of its memory, and swap space. As the system is multi-tasking, any program (or part thereof) that is not currently being run when extra memory is required, is swapped (moved) out to the disk, until it is ready to run again.
1.4 The Network
• Because the computers are on a network, they each have a unique identification.
• Each machine has a name, for example one of the machines is called ‘claymore.engineer.gvsu.edu’. The short form of this name is ‘claymore’. The machine also has an equivalent number ‘22.214.171.124’.
• you can log into other machines. Try ‘rlogin ws1’. This allows you to sit at one machine, and use many others, even around the world.
• you can also use a number of other commands which will allow network access,
rusers look at other users on the network
who look at who is logged into your machine
last a list of the last users logged in
• You can also access other computers with public access directories using the ‘ftp’ command. For example try ‘ftp 126.96.36.199’. This will connect you to a computer some place in the U.S. When it asks you for your ‘login name’ type ‘anonymous’. When it asks for a ‘password’, enter your name. You may now move around using ls, pwd, cd, etc. If you want to get a file from some directory, type ‘binary’, then type ‘get filename’. ‘quit’ ends everything.
• LOCAL UWO NETWORK(1989)
• Wide-Area Ontario and on (1989)
1.5 Good Manners
• Check your mail on a regular basis: your e-mail address is
• Do not run big programs on computers somebody else is using
• Keep your directory nicely structured
• DELETE ALL FILES THAT ARE NO LONGER NEEDED. We only have 200 Megabytes, and it will be used up faster than you think. Check your own disk usage with ‘du ~’. Check the total area available with ‘df .’. Check your quota with ‘quota -v’
• Compress all your big files using ‘compress *’. Uncompress them with ‘uncompress *’