Some Basic UNIX Commands

by Donald Hyatt

The UNIX operating system has for many years formed the backbone of the
Internet, especially for large servers and most major university campuses.
However, a free version of UNIX called Linux has
been making significant gains against Macintosh and the Microsoft
Windows 95/98/NT environments, so often associated with personal computers.
Developed by a number of volunteers on the
Internet such as the Linux group and the GNU project, much of the open-source software is
copyrighted, but available for free. This
is especially valuable for those in educational environments where
budgets are often limited.

UNIX commands can often be grouped together to make even more powerful
commands with capabilities known as I/O redirection ( <
for getting input from a file
input and > for outputing to a file ) and piping using | to feed the output of
one command as input to the next. Please investigate manuals in the
lab for more examples than the few offered here.

The following charts offer a summary of some simple UNIX commands. These
are certainly not all of the commands available in this robust operating
system, but these will help you get started.

Ten ESSENTIAL UNIX Commands

These are ten commands that you really need to know in order to get started
with UNIX. They are
probably similar to commands you already know for another operating system.

Command

Example

Description

1.
ls

ls
ls -alF

Lists files in current directory
List in long format

2.
cd

cd tempdir
cd ..
cd ~dhyatt/web-docs

Change directory to tempdir
Move back one directory
Move into dhyatt's web-docs directory

3.
mkdir

mkdir graphics

Make a directory called graphics

4.
rmdir

rmdir emptydir

Remove directory (must be empty)

5.
cp

cp file1 web-docs
cp file1 file1.bak

Copy file into directory
Make backup of file1

6.
rm

rm file1.bak
rm *.tmp

Remove or delete file
Remove all file

7.
mv

mv old.html new.html

Move or rename files

8.
more

more index.html

Look at file, one page at a time

9.
lpr

lpr index.html

Send file to printer

10.
man

man ls

Online manual (help) about command

Ten VALUABLE UNIX Commands

Once you have mastered the basic UNIX commands, these will be quite valuable
in managing your own account.