Commodore has released several Amiga computers that run an industry-standard, multitasking operating system called UNIX. What does UNIX have to offer the average Amiga owner, game player, power user, or programmer? How is UNIX different from the Amiga operating system (AmigaOS) that we get for free? Is UNIX "better"?
This is a series of two articles comparing and contrasting UNIX and AmigaOS. This month, we discuss these two operating systems from the point of view of an ordinary user. Part two will focus on topics for power users and programmers. These articles should serve as a quick introduction to the world of UNIX.
So what do you get? HUNDREDS of programs: text editors, spelling checkers, document processing software, over a dozen compilers and interpreters, programming tools, programs for sorting and searching data, on-line documentation, networking software, electronic mail, window systems, games, tape backup programs, three or four user interfaces (shells), and day-to-day programs similar to your Amiga CLI commands. And if that's not enough, thousands of freely-distributable UNIX programs are available.
UNIX GUI's tend to be more complicated and configurable than the Amiga Workbench. "X" allows a user to specify exactly what happens whenever the user presses any key or clicks the mouse anywhere on the screen. For example, you could easily design your own menu (both its look and its function) and cause it to pop up whenever you press the right mouse button or the F6 function key. This power comes with a price, though: "X" is a large and compute-intensive application, whereas Workbench is small and relatively speedy.
Now, let's compare and contrast the Amiga CLI and the UNIX shell. At first glance, they appear quite similar: they both have wildcards, script languages, command history, command-line editing, and so on. However, they have several important differences. The main one concerns the treatment of wildcard characters. Suppose you want to see your Amiga files whose names begin with 'A', so you type the CLI command
list A#?What happens now? In the Amiga CLI, wildcards are seen and interpreted by individual programs. This means that "list" itself must have the built-in ability to understand the "#?" characters; the CLI does not interpret them. In short, Amiga programs understand wildcards only if they are specifically written to do so.
In UNIX, wildcards are interpreted by the shell, not the programs. Here is a UNIX command like the AmigaOS command above:
ls A*The wildcard is interpreted by the shell before "ls" executes, becoming (let's say)
ls Aardvark Amiga Anniversary.txtFinally, "ls" executes as if you had typed the 3 arguments yourself. Thanks to the shell, every UNIX program automatically "understands" wildcards.
Here are some other shell/CLI differences:
There are several "shell" programs in the Amiga public domain that give the Amiga user many of the UNIX capabilities mentioned above. Some popular ones include Matt Dillon's "csh" and Steve Koren's "sksh".On the other hand, UNIX was built to be a multi-user environment. Every file has an owner, and only the owner can modify it. This protection is enforced by UNIX, and there is no way around it (unless there is a bug in the operating system!). Of course, the owner can choose to share files with other users on the machine.
How do you identify yourself as the owner of your files? Simple: when you first sit down to use the computer, you type in your name (really, a designated "login name") and a secret password you have chosen previously. If you type the password correctly, then UNIX treats you as that user until you end the computing session ("log out").
There is one special user on every UNIX machine called the Superuser, or "root". The Superuser may access every file on the machine without restriction. Important system files are typically owned by the Superuser, so they cannot accidentally be deleted by casual users. Have you ever deleted your only copy of Deluxe Paint by mistake? UNIX guards against this error.
As you might imagine, the Superuser's password is almost always a closely-guarded secret. If you are the owner and only user of a UNIX Amiga, however, it is likely that you will be your machine's Superuser and have access to all files. Even so, it is wise for you to create and use a separate, "ordinary" login name. When you are the Superuser, you lose the extra protection UNIX gives you, and it is once again possible to delete system files accidentally.
When a UNIX user "logs in", a private file similar to the Amiga's S:Startup-Sequence is executed. This allows each user to configure his/her UNIX environment differently from every other user's, even on the same machine. For example, one user's startup file might print a friendly HELLO message, while another's might automatically open four shell windows.
Having multiple users on the same machine opens the door for on-line communication. Electronic mail allows files and letters to be sent between users, and the programs "write" and "talk" allow users to carry on interactive conversations.
If you use your Amiga for its strengths in graphics and video, then there probably isn't much reason to move to UNIX right now. Similarly, if you primarily use "canned" Amiga application programs, and you are happy with them, then you may not need UNIX at the moment.
If you are a programmer, however, you should give UNIX VERY serious consideration. I'll talk more about this next time.
Here are some of my favorite UNIX books. For a very quick introduction, try "Learning The UNIX Operating System" by Grace Todino and John Strang (O'Reilly & Associates, Inc., 1987). For a solid tutorial and reference, try "A Practical Guide to the UNIX System" by Mark G. Sobell (Benjamin-Cummings, 1989). Once you have been exposed to UNIX, check out "Life With UNIX" by Don Libes and Sandy Ressler (Prentice-Hall, 1989). Interesting, well-written and funny, this book traces the history of UNIX and offers a lot of good (and hard-to-get) advice.
INTERNET: barrett@cs.umass.edu COMPUSERVE: >internet:barrett@cs.umass.edu
- barrett@cs.umass.edu