Introduction
to UNIX
Galen Sasaki
September 24, 2004
UNIX is a command line oriented operating system. There are a
large collections of UNIX commands to manage your account. These
include commands for deleting files ("rm"), navigating through
directories, etc. For a quick introduction to some of these
commands, read the tutorial at www-ee.eng.hawaii.edu/~sasaki/EE260/Labs/labUnix.html.
You can find other resources on the web. Another tutorial can be
found at www.ee.surrey.ac.uk/Teaching/Unix/
To write programs, you need an editor to create files. The
simplest is pico. To start pico, just type "pico". If you
want to edit an existing file "filename"
then type "pico filename".
If you are programming in the C language, the header files typically
have the suffix ".h" and the program files typically have the suffix
".c". You can also create a "makefile" which is a collection of
compiling commands for the operating system to follow. This is
useful if you have a large collection of commands to type. A
makefile is basically a script. There is only one makefile in any
directory and its name is "makefile." You can find a tutorial on
makefiles at www.eng.hawaii.edu/Tutor/intro.html.
At this web site, you can also find tutorials on C Shell and "vi",
which is another editor.
To compile, you may use "cc" or "gcc". This will create an
executable file (one that you can run on the computer) and its name
will be "a.out". To run the program, type "./a.out". Notice
that the filename "a.out" is prefixed with a period and forward-slash. The tutorial
on makefile at www.eng.hawaii.edu/Tutor/intro.html
also explains how to compile in UNIX.