The most often used commands:
Here we introduce critical commands in three basic groups: commands for files,
directories, and printing. Note that UNIX is case-sensitive, and all commands are lower
case. In the following, italics refer to the argument of the command.
Commands for files:
ls lists all the files and subdirectories in the current directory
cat file shows the contents of file
mv file1 file2 moves (or renames) file1 to file2
cp file1 file2 copies file1 to file2
rm file removes (or deletes) file
Flags. Most commands also accept flags, which modify the command or its output. For
example, ls usually doesn‟t list „hidden‟ files, which are files with names that start with
a period. To make ls list all files, including the hidden ones, use the -a flag: ls -a.
Using ls -l shows extra information about each file as it lists them. Flags can often be
combined; ls -al lists each file and the extra information for all files including hidden
files. The order of the flags is sometimes important, and sometimes the flags take
Wildcards. To manipulate a large number of files at once, wildcards can be used. An
asterik is a wildcard that stands for any string of characters; for example, ls m* will list
all files and subdirectories that begin with the letter m. A question mark stands for any
single character: ls mat? lists all files or directories that are four letters long and start
with mat. Wildcards are very powerful; hopefully you will realize this before typing
rm *. Be careful!
The man command:
man command displays the manual page for command
This is one of the most important commands in UNIX when you are just starting. The
man command gives a description of each command, its arguments, and its flags. The
output of man is called a „man page‟.
Commands for directories:
cd directory change from the current directory to directory
mkdir directory make a directory called directory
rmdir directory remove directory if it contains no files
Directories. Directories are used to organize your files. Your „home‟ directory is where
you are when you login to a machine. Your home directory is at the „top‟ of your
account, and subdirectories you create using the mkdir command are „below‟. To go to
directories one level below, you just use cd directory1. To go two levels below, use
cd directory1/directory2. There are names for two special directories; the directory
immediately above is referred to by two periods, while the current directory is referred to
by a single period. If you type ls -a these will be the first two things listed. Use cd
.. or cd ../ to go up one directory.
The mv command can also move files to other directories. If file2 is a directory, file1 is
moved but retains its name. Alternatively, file2 can have the form directory1/newname;
then file1 is moved to directory1 and renamed newname. In fact, you can always use
commands for files when the files are in other directories as long as you refer to the file
using the format directory/file.
Your home directory is actually a subdirectory, and the levels above it contain everything
else stored on the machine, like various software packages, the operating system (UNIX),
stuff for the printer, scanner, your monitor, etc. Actually, a lot of the stuff is not even on
the particular machine you are logged in to, but the directory structure is essentially
seamless so you don‟t notice you are looking at files stored on a different machine.
lpr file send file to the default printer queue
lpq show the entries in the default printer queue
lprm number delete job number from the printer queue
Printing. The lpr command sends files to the printer. The other commands are useful for
canceling mistakes you make. If you try to print a file in a format that the printer doesn‟t
recognize (i.e. a binary file) it will consume lots of paper and you will have gibberish to
show for it. Avoid this, because everyone behind you in the print queue has to wait for
your job, and because paper and toner are expensive. If you lpr something you don‟t
want printed, you need to find its job number with the lpq command, then remove it
from the queue using the lprm command. It is important that you take responsibility for
your own print jobs, because other users cannot cancel them; lprm only allows you to
dequeue jobs you have submitted, not others.
The default printer is in AkerH 305 and is called lp_305. For other printers, you can
print, check the queue, and cancel jobs using the -Pprinter flag, for example
lpq -lp_107 checks the print queue on the printer called lp_107.
Some other useful commands:
date gives the current time and date
who lists the users currently logged onto the machine
finger name gives information about the user name
pwd lists the current directory
quota lists allotted and used disk space
du disk usage by the files in the current and lower
more file displays the contents of a file, one page at a time
less file a newer version of more
passwd, yppasswd used to change your password
enscript prints plain text files using different page layouts
ispell file a spell-check program for plain text files
chmod file changes the protections (who can access) of file
For more information on these commands see their man pages.
Editors. Editors are used to create and modify plain text (or ascii) files. Popular editors
include jot, emacs, vi, and nedit. jot, which runs only on Silicon Graphics
machines, and nedit are simple and easy to learn. emacs is more powerful, but it
takes a little longer to master all the added features. vi is not as easy to learn as the
others, but it is always available on UNIX machines.
The Network and the Internet
When you sit at a workstation in the departmental computer lab, you have access to many
other computers. A workstation consists of a monitor, a keyboard, and a rectangular box
with the actual computer inside. Each particular workstation has a name; in the AEM
department they are various words for winds in several languages, such as typhoon,
tornado, hurricane, zephyr, crivat and minuano. While workstations can stand alone, they
are almost always connected to each other electronically through the „network.‟ On the
network each workstation has an address, for example, typhoon.aem.umn.edu. When you
log in to one of the workstations by typing your login name and password at the prompt,
the workstation accesses your „account,‟ a certain amount of space in memory which
contains any files you have. To get your login name and password, see Ray Muno, the the
department‟s system administrator. One of the first things you should do is change your
password (using yppasswd) to one of your own choosing. Don‟t pick anything obvious,
which includes anything in a dictionary, any real or fictional names, or any part of your
address, phone number, birthday or other personal information. Your login name is a
particularly bad choice.
You have several other accounts at the University of Minnesota. All students have an
account on tc.umn.edu. Your login name is the first four letters of your last name and four
numerical digits. When you log in to tc, you are presented with menu options which
allow you to choose from the above services; the UNIX commands are not accessible
unless you follow the menu choices to “Shell access”. The departmental workstations are
more powerful, so most of your work will be done through your AEM account.
You may also have an account on the Institute of Technology‟s Computers (IT account.)
Graduate students who have completed fewer than 36 quarter or 24 semester credit hours
or are registered for a course that requires IT computing facilities are automatically
charged the IT computing fee for the semester ($165) and have an IT account. Any IT
graduate student that isn‟t automatically charged can voluntarily open or maintain an IT
account by paying the fee. IT workstations are located in several computer labs around
campus; the one in ME 308 is the closest to Akerman Hall. To activate your IT account,
go to one of the labs. While the IT workstations do have some software not available on
the department machines, they generally duplicate AEM computing facilities. To access
the files in your IT account from an AEM machine, you will need to use the network.
telnet address log in to another machine
ftp address get or put files on another machine file
The ftp command is used to transfer files between accounts, while with telnet you
are actually logged in to the other machine. Both of these commands establish a
connection to another machine; other commands are used after the connection is
established. In the case of telnet, the other commands are just the UNIX commands
we have been discussing. To close a telnet connection, type exit. See the man pages
for more information about ftp.
Email. Each of your accounts has an associated email address, namely, name@address,
where name is your login name for your account at address. Two popular programs for
managing your email are pine and elm, which are both easy to use. To read your email
on tc, there are menu options to choose and invoke a mail program. On your AEM
account, type the mail program name.
It is possible to have all your email directed to a single account using forwarding. To
forward your mail from your IT account to your AEM account, create a file in the home
directory of your IT account named .forward. Mail sent to your IT account will then be
redirected to the address contained in the .forward file, in this case email@example.com.
There are menu options to allow forwarding from your tc account.
The Web. By now everyone has heard of the World Wide Web, the vast collection of data
organized into „pages‟ which are viewed with a „browser‟ such as netscape or mosaic. If
you have never explored the web, the easiest way to learn is by doing. Netscape will start
a browser (it may take a few seconds to come up.) Pages are accessed by clicking the
mouse on „links,‟ which are generally underlined text, but can also be images or icons.
Pages can also be accessed by typing in the address of the page, preceeded by http://, in
the browser location window.
Web pages are just files at a particular internet address, written in a language (HyperText
Markup Language, or html) that a browser can read. If you invoke netscape from your
AEM account, you will start at the AEM home page, www.aem.umn.edu; this page has
basic departmental information. More specific information about courses, departmental
computing and general computing help, career services and job hunting, and links to
University services are available at the AEM student page, www.aem.umn.edu/aero/.
Despite its image as a trendy, flashy toy without substance, the web can actually be used
for more than entertainment. The following brief list of sites may be helpful:
U of M Twin Cities campus www.umn.edu
Council of Graduate Students gapsa.stu.umn.edu/cogs/cogs.html
Maps, Busses, and Getting Around Campus onestop.umn.edu/Access/index.html
Register for class online onestop.umn.edu/registrar/registration/index.html
Student access system onestop.umn.edu/registrar/Grades/index.html
University library www.lib.umn.edu
U of M Science and Engineering Library sciweb.lib.umn.edu
*RECON and COMPENDIX are useful for literature searches. RECON was developed
by NASA and performs searches most frequently on aerospace related journals and
NASA sources. COMPENDIX searches through science and engineering journals.