Select from the choices above.

Please send all questions & assignments to:
dsolarek@eng.utoledo.edu

Introduction to UNIX

What is UNIX?

UNIX is an interactive time-sharing operating system which like all other operating systems accepts user commands and directs the computer's response to these commands to the appropriate place. In other words, UNIX is a control program for a computer which allocates computer resources and schedules tasks. Since multiple users may each execute multiple commands simultaneously, UNIX is characterized as a multi-user, multitasking operating system. This multitasking is achieved by running tasks in both the foreground and background (e.g., printing a document in the background while editing another document in the foreground). When using X-Windows1, multitasking can also mean running multiple windows each with foreground and/or background activity.

History of the UNIX Operating System

The first version of UNIX was created in 1969 by Kenneth Thompson and Dennis Ritchie, system engineers at AT&T's Bell Labs in Murray Hill, New Jersey. Ken Thompson's original work took place after Bell Labs withdrew from the MULTICS2 project (in which he was a participant).

At least one author has said that Ken Thompson wrote UNIX so that he could play games on a spare DEC3 PDP-7 that he scavenged after leaving the MULTICS project. Although this was probably a part of his motivation, it is likely not the whole story. He began developing space related programs (satellite orbit predictors, lunar calendars, space war games, etc.) on the DEC PDP-7. However, the program development environment was much more primitive than what he had been using under MULTICS. So to make the job easier, he decided to write a new operating system for the DEC PDP-7 using only the most desirable and essential ideas from MULTICS.

Working in DEC PDP-7 assembly language he developed a hierarchical filestore, a number of utility programs and central supervisory program which together made up a rudimentary single-user operating system. Thus, instead of a big multi-user system (like MULTICS), he created a small single-user operating system on a computer of very limited capability. This change from multi-user to single user was in part what prompted Brian Kernighan (another Bell Labs computer scientist) to suggest the name UNICS for the new system. However, in the program development environment of the DEC PDP-7 where Thompson wrote the first version of the new operating system, filename limitations led him to shorten the name to four characters ... UNIX, the name by which it is still known. So UNIX is a word play on MULTICS, replacing the "multi" with "uni" and the "cs" with "x".

The UNIX operating system found favor with his colleagues in the computer science department because it made software development work easier. Some text and processing utilities were added to the system, which were used by the Bell Labs legal department (where it was used as a text processing tool for the preparation of patents) and earned the developers enough funds to obtain a DEC PDP-11 a more reliable and modern computer. The 16-bit DEC PDP-11 became the second UNIX port, and enabled multi-user facilities because of the memory management hardware.

Dennis Ritchie, the inventor of the C programming language, is considered the co-author of the UNIX operating system. The turning point in UNIX's history came when it was reimplemented almost entirely in C during 1972-1974, making it the first source-portable operating system. The first port of the UNIX operating system onto a non-DEC computer in 1980, a 32-bit INTERDATA 8/32 minicomputer system highlighted some of its weaknesses. UNIX subsequently underwent mutations and expansions at the hands of many different people, resulting in a uniquely flexible and developer-friendly environment.

Version 6 of UNIX (which ran on the DEC PDP-11 series) was made public and licensed to universities without any software support, but with all the source code, for the cost of the media. This opened the door for the University of California at Berkeley to improve UNIX and become one of its strongest advocates. Another factor which helped Berkeley is that during a sabbatical leave from Bell Labs (beginning in 1975), Ken Thompsom spent a couple of years at Berkeley as a visiting professor. While there, he helped install UNIX Version 6 on a PDP-11/70. During this period, Berkeley created useful extensions to the UNIX system and offered software support. In 1977 UC-Berkeley released the first Berkeley Software Distribution of UNIX, which became known as BSD. Over time BSD has won favor with users through such innovations as the C shell. Berkeley stopped development of its BSD UNIX with the release of its last version, 4.4 BSD, in 1993. Now Berkeley Software Design, Inc. (BSDI) is the commercial supplier of the BSD/OS originally developed at the University of California at Berkeley.

UNIX went through many revisions and gained in popularity until 1977, when it was first made commercially available by Interactive Systems Corporation. The 1978 release of Version 7 included the Bourne Shell for the first time. By 1983 commercial interest was growing and Sun Microsystems produced a UNIX workstation. System V appeared, directly descended from the original AT&T UNIX and the prototype of the more widely used variant today. By 1991, UNIX had become the most widely used multiuser general-purpose operating system in the world.

What is Linux?

The class server for this course uses Linux as its operating system. Linux is the free UNIX workalike created by Linus Torvalds and friends starting about 1990. Linux is a clone of UNIX for Intel-based microcomputers and is distributed free of charge over the internet. What Torvalds actually did was to write a kernel4 for the existing GNU components (e.g., utilities, compilers, libraries) and integrate them into a complete operating system ... including considerations for installation and booting. Thus, Linux was created as a complete operating system. This result is what GNU5 was intended to be, but in its original incarnation, the Free Software Foundation did not produce the kernel to go with its UNIX toolset.

Other, similar efforts like FreeBSD, OpenBSD and NetBSD have been somewhat less successful. The key to Linux's success is perhaps the fact that Torvalds worked very hard early in the project to keep the development process open and to recruit others to help, creating a snowball effect.

What is the Best Operating System?

Your preference for a specific operating system is a product of several factors, including your own familiarity and comfort, the system's ease-of-use, flexibility and powerfulness. UNIX is certainly flexible and powerful, and these characteristics can lead to ease-of-use.

The primary interface between the user and the UNIX operating system is called a shell6. Remember, the computer's operating system is responsible for the following:

  1. prompting the user for input,
  2. interpreting any special characters in the command line, and
  3. either executing the typed command line or passing the request on to another program ... the shell.
Apart from application programs it is the shell we spend most of our time interacting with and hence the need to become most familiar with the several various UNIX shells. There are two common shells in existence known as the Bourne shell (sh) and the C-shell (csh). The latter has superior interactive features and the former has extensive programmable features. Generally the C-shell is more popular, although both shells have much in common. Take care if you are buying UNIX books that they describe the right shell. In either case the shell insulates the user from the UNIX kernel which is the software which dispatches the services. The kernel creates the illusion that all systems look like the same virtual machine by providing a consistent set of services irrespective of hardware details. Strictly speaking the kernel is UNIX which is why standards like POSIX7 define exactly what services are provided by the kernel. It should be noted that the shell is no more privileged a program than any other and may be easily be replaced for users with particular needs, which can be useful for providing restricted services when needed.

The operating system of Sun Sparc10 workstations is a UNIX derivative. Since UNIX was designed from the ground up to incorporate networking, powerful software, and a multi-user environment, it is particularly reliable. UNIX takes commands from the keyboard, just like DOS does for an IBM compatible microcomputer. In fact, if you are a DOS user, you are already be familiar with many of the functions of UNIX, such as listing directories and erasing files. However, the names of the commands are usually different. You'll find a summary of useful UNIX commands as part of this website.

Characteristics of UNIX

What is it about the UNIX operating system that makes some people like it and others dislike it? Listed below are a number of UNIX characteristics (both "good" and "bad") which are often cited when this question is asked.

PROs:

  • Substantial support. A large number of books, videos, training seminars, consultants, and Internet resources are all readily available. There is a lot of free information on the Internet if you know where to look (e.g., Lycos, Yahoo, Infoseek, Altavista, Hotbot, and Webcrawler). Care should be taken that the particular resources that you use cover your "flavor" of UNIX and/or software tools. The problem here is deciding which of the many overlapping sources of information to choose.
  • Online help and documentation. Programs, subroutines, and data-structures are well documented and these documents are available online. These online help/reference documents serve the needs of those who need memory jogging. New users will likely need additional help to introduce them to a subset of UNIX commands and the local server.
  • Software tools. Huge range of software tools ranging from simple information display to compiler writing tools. New users will find it hard to know where to start while experienced users will never be bored since they will always have something new to learn. New user documentation is left to the discretion of the local system administration.
  • Up-to-date. UNIX is normally at the leading edge of technology hence users should benefit. This has certainly been the case with local and wide area network developments in the recent past. Likewise peripherals as soon as they are invented usually appear first under UNIX (e.g., writable CDs) because it is an Open System.
  • Help is available. There are many fellow users therefore the first rule of UNIX is befriend your nearest UNIX guru! At the same time beware of those who constantly say "it is easy," what they usually mean is that it was not easy when they tried it and they want you to share their misery.
  • Powerful features. UNIX has a vast repertoire of powerful features which for some users may be more than they need. Therefore, a system administrator should try to make restricted shells the norm for non-computer literate users. Graphical User Interfaces (e.g., X-Windows) can also be used sometimes as user-friendly interfaces. A system which is powerful should be able to be configured to be user-friendly for the non-computer literate.
  • Alternative versions. Two major strains of UNIX coexist, each with several versions. This is testimony to UNIX's long history and wide usage. At the user level the differences should not be a problem and may even be concealed. Most users spend much of the time using a subset of UNIX which can be derived from the days before the split took place. Differences from version to version are usually less traumatic than has been the case with some more recent operating systems (e.g., MS-Windows 3.x, Windows 95, and Windows NT). Both major strains of UNIX carry a parallel set of Operating System binaries so that if you migrate from one strain to the other, it is possible to carry on as if nothing has changed. Emulators also exist so that applications written for one strain can run without change on the other strain, although this introduces a performance overhead, it is often an acceptable and quick solution to the compatibility issue.
  • Built-in email. The UNIX email system is a great asset. If you are connected to the Internet it is a fast, cheap and easy way to communicate and propagate information. The mail utility can send multi-media file types as attachments and all of the Internet data sources (e.g., ftp, gopher, WAIS, WWW, archie, veronica) may all provide their data through email requests.
  • International community of Guru's. The Internet is full of host systems dedicated to making available the latest news, bug-fixes, software and bulletin-boards. There are about 14,000 newsgroups covering such diverse subjects as computer developments of every operating system and major software package. The second rule of UNIX is never reinvent the wheel if you can avoid doing so. Or put another way, we stand on the shoulders of those that went before us. UNIX is an open system and many users make available freely the fruits of their labor in the spirit of this philosophy.
  • Graphical User Interface. The use of Graphical User Interfaces (GUIs) has made UNIX "look better" to some users. The adoption of MOTIF8 by the major workstation manufacturers may do for UNIX what the various Windows versions have done for DOS (i.e., standardize the appearance of application programs). The use of a GUI makes UNIX more accessible to new users, but has not alleviated the need for the knowledge of command line interaction.

    Here are some reasons why it is still important to know how to use UNIX at the command line:

    • The command line is buffered so it is possible to type the next command(s) before the current one has finished, with a GUI you usually have to wait for the last to finish.
    • File activities spanning two different parts of a hierarchical filespace can often be performed more easily from the command line.
    • Some of the GUI interaction will be filling in dialog box information or responding to cautious prompting, which an experienced user could more quickly execute from the command line.
    • Another layer of software (i.e., X-Windows) may reduce the computer's performance (especially its speed).
    • X-Windows terminals cost more than simple VDT (video display terminals).
    • The UNIX system administrator must spend some time under single-user UNIX which is usually command-line UNIX.
CONs:
  • Too techie oriented. In the past the UNIX applications have been mainly technical and scientific and less oriented towards the personal productivity tools (i.e., databases, spreadsheets, wordprocessors, etc.). This made sense when workstations cost a lot more than desktop PC's. However, the current price/performance ratio for PC's and workstations has meant there is much more overlap in this area of applications. Thus, we are now seeing programs like Netscape, Lotus-123, and WordPerfect appearing on UNIX as well as MS-DOS and MS-Windows machines.
  • Cryptic and terse commands. UNIX command names are often cryptic and terse and rarely intuitive. In fact there are so many possible tools that if you create a new software tool there is a chance you will pick the name of an existing tool (e.g., ed, test). New users should be incrementally introduced to the available commands and if necessary the standard tools should be aliased to more intuitive command names. The onus is upon the local system administrator to ease the first UNIX interactions for new users some of whom will not be (nor want to be) computer literate.
  • Command syntax. The syntax of C and regular expressions appears many times as part of the command set for many of the UNIX software tools. To the new user who accidentally types or misunderstands one of these meta-characters (usually punctuation) UNIX can be most unpleasant. To the experienced user many complex actions can be expressed concisely using metanotation and in a way which is consistent for similar actions within other software tools. The third rule of UNIX philosophy is the less typing you do the less chance there is to demonstrate you can not type.
  • File security. Many systems are set-up without much consideration of user file security, in order to allow easy user to user file transfer. UNIX is often accused of being insecure but if you address the specific accusations you often find either the accuser does not properly understand the full story about UNIX security or that the system administrator has made a trade-off in order to simplify administration. The standard installation assumes that the system has been set-up on a system of co-operating, sensible known users. If this is not the case (e.g., when you provide remote logins) then some of the security relaxation's should be undone.

Assignment

Using the various WWW search engines, complete the following before our next meeting:

  1. Compile a comparative list of pros and cons for UNIX versus Windows NT as the operating system for a WWW server.
  2. It is best to summarize this information in some sort of table.
  3. All URLs consulted for this assignment must be included for each item in the list.
  4. This list of specific pros and cons and the URLs referenced must be submitted to your instructor via email.


Footnotes:

1.
X-Windows is the UNIX equivalent of Microsoft Windows. It offers graphical access to system resources, e.g., commands are given with mouse clicks. Most menus and commands are simple and will be familiar to the minimally computer literate (file, edit, save, save as, close, etc.).
2.
MULTICS (Multiplexed Information and Computing Service) is a timesharing computer operating system begun in 1965 and still in use today. The system was started as a joint project by Bell Laboratories, General Electric Company's Large Computer Products Division and MIT's Project MAC. Bell Labs withdrew from the MULTICS project in 1969, and in 1970 GE sold its computer business to Honeywell. Honeywell offered the MULTICS operating system as a commercial product.
3.
DEC (Digital Equipment Corporation) a large company that popularized the idea of a minicomputer (something smaller, less expensive, and more fun than a mainframe) before there were PCs. Their PDP (Personal Digital Processor) and VAX (Virtual Address Extension) minicomputers became the standard for real-time, scientific, and UNIX computing. Industry-wide benchmarks are still based on DEC's VAX-11/780, which was introduced in 1977.
4.
The kernel is the essential center of a computer operating system, the core that provides basic services for all other parts of the operating system. A synonym is nucleus. A kernel can be contrasted with a shell, the outermost part of an operating system that interacts with user commands. Kernel and shell are terms used more frequently in UNIX and some other operating systems than in IBM mainframe systems.
5.
GNU is a UNIX-like operating system that can be freely copied, modified, and redistributed. The GNU project was started in 1983 by Richard Stallman and others, who formed the Free Software Foundation. It became a complete operating system in August, 1996, when a kernel, consisting of GNU Hurd and Mach, was added. The Linux operating system consists of GNU components and the kernel developed by Linus Torvalds.
6.
The term shell is used for the user's interactive interface with the UNIX operating system. The shell is the layer of programming that prompts for, receives, interprets and executes the commands a user types. In some non-UNIX systems, the shell is called a command interpreter. A shell usually implies an interface with a command syntax (think of the DOS operating system and its "C:\>" which prompts the user for commands such as "dir" and "copy"). As the outer layer of an operating system, the shell can be contrasted with the kernel, the operating system's inmost layer or core of services.
7.
POSIX (Portable Operating System Interface) is a set of standard operating system interfaces based on the UNIX operating system. The need for standardization arose because enterprises using computers wanted to be able to develop programs that could be moved among different manufacturer's computer systems without having to be recoded. UNIX was selected as the basis for a standard system interface partly because it was "manufacturer-neutral." However, several major versions of UNIX exist so there was a need to develop a common denominator system.
8.
MOTIF is a Graphic User Interface prevalent on UNIX based computers. OSF's (which developed it) graphical user interface (therefore sometimes called OSF/Motif ), widely licensed by OSF to others. It is both a standard API (and GUI) and a GUI alone (the "look-and-feel" to the end user), since there are other APIs, such as Tcl/Tk, that can provide a Motif-like user interface (almost the same appearance and behavior). The Motif API is a standard tool kit for GUI applications that works at the level of menus and icons. Motif is based on work by Hewlett-Packard and DEC and is also promoted by IBM. (These three companies are therefore major proponents of the technology.) Motif uses the X Window System as its communication protocol and low-level (that is, drawing boxes and the like) display interface.

 

There have been visitors since 11/26/2003

Added to the Web: November 30, 1997.
Last updated: September 8, 1998.
Web page design by Dan Solarek.

http://cset.sp.utoledo.edu/