Introduction to UNIX Operating System:

The UNIX operating system can be used to

Our SUN workstations run a version of UNIX called Solaris. Different vendors (DEC, SGI, etc.) run slightly different flavors of UNIX but they are all very similar.

Window Managers When you login, several files are automatically executed giving the final "window" appearance you see. This appearance is a result of UNIX executing a window manager program. There are many types of window manager programs each of which can be customized. Regardless, most window managers use something called the X window library to create their final appearance. Most window managers have mouse driven menus and window actions (such as moving windows).

C-shell (csh) Some windows run a program called "csh" which allows the user to enter UNIX commands in that window. By typing appropriate commands you can copy files, rename files, execute software, make internet connections, etc.

File organization and basic UNIX commands PC's and MacIntosh computers use "folders" to organize where files reside. UNIX uses "directories". "folders" and "directories" are synonymous.

When you login, the default directory in your C-shell is called your "root" directory. The name of this directory is "~username/" (see figure below). You can create "subdirectories" from each directory and generate a tree structure in which to organize your files:

To create the tree structure above you would execute two "make directory" commands

mkdir dir1

mkdir dir2

Once these have been created you can move around the directory structure. This is done using the "change directory" command - abbreviated to "cd" in UNIX. The command

cd dir1

would place you in directory "dir1". To move back up to your root directory you would then execute

cd ..

The ".." means "directory above". If you are not sure which directory you are in use the "print working directory" command - abbreviated to "pwd" in UNIX. If you want to list the files in the current directory us the list command "ls". Below are some UNIX commands associated with file and directory manipulations:

Command Meaning
ls list all files and subdirectories in the current directory
pwd print the current directory name (in long form)
mkdir NAME create a subdirectory named NAME off the current directory
cd NAME change current directory location to subdirectory NAME
cd .. change to upper directory closer to root directory
cd change to root directory
cp FILE1 FILE2 copy FILE1 to FILE2
mv FILE1 FILE2 move (or rename) FILE1 to FILE2
rm FILENAME remove (or delete) the file FILENAME

Editting files Each UNIX system has many editors and this can vary from system to system. Two that are almost universal to all UNIX systems are 1) vi and 2) emacs. Neither of these editors has any font or format options like PC and MacIntosh editors such as Word or Wordperfect. The editor "emacs" does have menus and mouse operations and stores its results as simple "text" or "ASCII" file. ASCII format is extremely portable and for that reason emacs is a favored UNIX editor in the UNIX community. Our system does, however, have an older UNIX version of Wordperfect. However, UNIX and PC Wordperfect documents are not portable very often.

Command Meaning
emacs FILENAME & edit file FILENAME using "emacs" editor (in background)
xwp & execute wordperfect (in background)

The "&" sign at the end of these commands is a common UNIX syntax. Putting "&" at the end of any UNIX command means "execute the command in background". This is useful if your command will be continually running (such as an editor) or takes a long time to execute (such as a number crunching fortran program). If you typed "emacs FILENAME" without the "&" at the end emacs would work the same way but you could not execute commands in the C-shell while the emacs window was up. By placing the emacs "process" in "background" you keep the C-shell active.

Printing files The command

lpr FILENAME

will send ASCII (text) files to the laser printer. Many software packages create "postscript" files whose name ends either in ".ps" or ".eps" (i.e., FILNAME.ps). You can often save figures as postscript files. If you ever have a such a file and you want to print it use

lpr FILENAME.ps

Some other useful commands

Command Meaning
kpasswd to change your password
more FILENAME scroll the contents of FILENAME to your C-shell (q to quit, space to scroll)
man COMMAND display the manual for COMMAND (q to quit, space to scroll)
ps display the UNIX processes currently running

Software Commands

Command Software Description
matlab Used to solve linear systems and implement a variety of numerical algorithms on different types of math problems. Has large libraries (toolboxes) of commonly used numerical algorithms.
xmaple & A symbollic manipulator program used to symbollically perform calculus, linear algebra and other mathematics. Can be used to implement simple numerical algorithms.
emacs & a text editor (with menu and mouse operations)
xemacs & a friendlier version of emacs (flakey-use at your own risk)
xwp & A UNIX version of Wordperfect
netscape & web browser
xfig & A program for drawing figures

ADDITONAL WEB SITES FOR UNIX TUTORIALS

Unix Commands description of commonly used unix commands and syntax.

Unix Introduction I A site describing concepts: directories, etc

Unix Introduction II A site describing concepts: directories, etc