Quick Summary of Unix Commands

The following commands will at least get you started in unix. There are many more. Look at some other site referenced in the class Home Page .
This is unix help. To get help you need to know the command name. For example, you could type 'man ls'. You can also do keyword searches if you don't know the exact name of the command you want information on, for example : "man -k password".
This command COPIES files. For example "cp file.dat new.dat"
This LISTS files in a directory. Most often you would type "ls -l" . The "-l" key gives all file details. A "-" in a Unix command designates a command option.
This makes a directory just like in DOS.
CHANGE DIRECTORY, for example "cd newdir". Typing just "cd" will take you to your home directory.
Tells you which directory you are currently in (print working directory)
removes (deletes) a file, e.g. "rm file.dat"
Menu driven mail program. very handy.
mail, mailx, or Mail
Standard unix mail program (note that mail, mailx and Mail do different things sometimes)
This moves a file (sort of like renaming it). For example "mv oldfile.dat newfile.dat" renames "oldfile.dat" to "newfile.dat". If a subdirectory called "sub1" exists below the directory containing "oldfile.dat", then "mv oldfile.dat sub1" would result in the file moving into subdirectory "sub1", but keeping the same name.
Lets you view a file on the screen, for example "more file.dat". Use the space bar to page thru the file. Type "q" if you have seen all that you want to see. Typing "/text" will search down through the file until the character string "text" is found.
Fortran compiler command. "f77 test.f -o test" puts the executable into "test". To run the program you then just type "test" . (Note: cc is the c compiler) If you just type "f77 test.f", the executable program is created with the name "a.out".
Changes your password. Be sure to use at least 8 letters in the password, including at least 2 numbers or strange characters like "+", "-", "?", "!", etc. Mixing upper and lower case letters is a good idea.
ps or jobs
Shows jobs running on the system. (you can use "kill" to kill jobs)
Prints a file. To print to the 315 Hammond Postscript printers, use

"lpr -Pps file.ps"

Shows who is currently on the system.
Checks disk usage
quota -v
Shows your quota and your current usage of disk space. 


This is a beautiful editor but only works on the SGI's.
A simple X-windows editor (will not work from a dumb terminal)
A standard unix editor.
A standard unix editor.

Networking Commands

Lets you connect to another computer and copy files back and forth. (e.g. "ftp brownie.hbc.psu.edu") Once you get connected, you use the "get" and "put" commands. You can also type "help" for a list of more commands.
This allows you to connect to another computer and run programs on it. (e.g. "telnet farman.cac.psu.edu")
setenv DISPLAY
This command is crucial for using Xwindows. When you use telnet to connect to a remote computer, you have to telnet that computer where to display the Xwindows. That is what this command does. (e.g. "setenv DISPLAY farman.cac.psu.edu:0") The ":0" tells it to use monitor number 0. In this example, farman is the machine you are physically sitting at. On the local machine you may also have to type "xhost +" which lets other machines send iamges to your machine.
this command lets you control what other computers can send Xwindows images to your computer. It is used as: "xhost cupcake.hbc.psu.edu" (which would give the remote computer (cupcake) the ability to display Xwindows images on your computer. The command "xhost +" lets ANY computer send Xwindows images to your computer.
xmosaic &
Loads the WEB browser Mosaic in X-windows form. The & symbol puts it in the background so you can then type other commands.
netscape &
Loads the WEB browser Netscape.

Up one level / Home

Maintained by John Mahaffy : jhm@cac.psu.edu