Ken Thompson, original inventor of Unix (front), and Dennis
Ritchie, inventor of the C programming language, designing
the original Unix operating system at Bell Labs on a PDP-11
One of the first things I discovered in my quest to better understand the
workings of the Internet was that a huge percentage of the Internet was run
by unix machines. Unix, an operating
system just like MacOS or Windows, was originally designed on an
old mainframe computer that took up an entire wall. It has pretty
much become public domain, and literally millions of people all over
the world have added things to it and refined things in it, and unix as a
result had come to be very stable and reliable, and thus perfect for Internet
servers that need to be running all the time. It's also designed by
the technically inclined for the technically inclined for the most part,
which means life for programmers like me is easier under unix. There are new
flavors of unix available today (like Linux) that are more geared toward
the less technical user, but the learning curve is still way steeper (a
steeper learning curve means faster learning, right?) in Windows or MacOS for
new users. If you just want to read email, write letters, browse the web,
and get up and running quickly, unix is not for you
(although all these things are possible using unix). If you want to design
web and Internet based services, design network troubleshooting utilities,
if you just miss that command-line interface, if you're concerned about network
security, or if the amount of bloated and slow software in commercial
operating systems bother you, unix is worth learning.
If you've got a spare (386 or higher, or maybe an old mac or sparcSTATION)
computer lying around that you'd like to play around with unix on, my personal
reccomendation would be netbsd, which is
availiable for free and runs on just about anything, and pretty much has the
lowest common denominator of the unix command set, so pretty much everything
you learn on a netbsd system can be used on any other unix system. I wouldn't
reccomend Linux, as it's hard to tell what's de-facto standard in a Linux
distribution, and what's something they just added because it might attract
the user base.
I'm designing this set of pages as a way to get across what I've learned in
the past eight years to the new users out there. Since the evolution of unix
has forked several times (several vendors throughout unix history have released
their own flavors of unix), I'll be focusing on things here that are common to
as many flavors of unix as possible. Thus, I'll be mostly covering the
command line interface, although I will briefly mention the graphical user
interface most unix systems are equipped with,
the X Window System, because it's design is very clever.
Also, when I get some time, I'll seperate the history of unix out into its own
page where I'll talk about the people who influenced the development of unix
into what it is today.
It could be said that the two most important programs to know in the Unix
operating system are a shell and an editor. Most configuration of programs
under Unix is done in text files (which you edit with an editor). The most
popular editor for Unix is `vi' (not because it's easy to use, but because
it's been around since the dawn of time and it's availiable on every Unix
system since). Check out our vi reference.
The shell on the other hand is the program you'll interact with the most.
The shell is the first process that runs after you log into a unix system.
The shell is the program that interprets the commands you type and runs the
necessary programs on your behalf. The shell also interprets shell scripts,
which can be quite like DOS batch files - A file containing a series of
commands to run in sequence. Shell scripts can also have more powerful
constructs commonly found in other programming languages like if..then,
while, for loops, etc. Unix is designed so that any part can be drop-in
replaced easily, so there are several shells usually availiable:
csh (C Shell) Check out our
csh reference.
C Shell was written by Bill Joy at the University of California Berkeley in
The late 70's. It's the most powerful shell you'll most likely find on any
Unix system you come across. It has job control, which makes switching
between running tasks easier. It also has command history, which allows
you to summon recently typed commands, modify them (if neccessary), and
then rerun them. It also has filename completion, which allows you to
type just enough characters of a filename on the command line to single it
out, and then tell the shell to type in the rest for you. csh is the
default shell your account on Monolith is set up with. The prompt is a
`%'. (usually) Shell script syntax looks like the C programming language
(thus the shell's name).
sh (Bourne Shell)
Bourne Shell was written at Bell Telephone Laboratories by Stephen Bourne
in the late 60's. It is the absolute minimal shell required to get the
job done.
During interactive use, Bourne shell prompts you with a '$'.
You are guaranteed to find this shell on any Unix system. For this
reason, and also because C Shell does some things insecurely in regards to
shell scripts, Bourne is the most popular shell for writing shell scripts in.
A tutorial on Bourne shell scripting should appear here soon.
ksh (Korn Shell)
Korn shell is Bourne Shell with job control. I think it was also written
at BTL.
bash (Bourne Again Shell)
Bourne Again Shell was written by Richard Stollman in the late 80's / early
90's. It's based on Bourne shell but has job control, filename
completion and command history that's really easy to use. It can be found
on almost any linux system, but not everywhere. Bourne Again Shell is not
installed on any rfc791.org systems. (Why learn something you may not
be able to use somewhere else?)
My personal reccomendation to anybody is csh, because it is available
on almost any Unix system ever, but still has a reasonable amount of power.
Check out our
C Shell
page, which also has information that's relevant in other shells.
Armed with what you've learned about shells and
editors, the next logical phase of learning Unix
would be reading the manual and trying things.
So, you'll need a set of commands to look up in the manual and try.
Here's a pretty good list: