This subchapter looks at the history of UNIX and Linux.
The history can help you understand why things are they way they are in UNIX and Linux.
Of particular concern are: the small storage space of early computers which resulted in short command names and one character options, the switchover from teletype I/O to video terminal I/O, the use of eight bit bytes, ASCII characters, and plain text for interprocess communication, and the use of small, single-purpose programs that can be easily combined together to perform complex tasks.
This subchapter looks atthe history of UNIX and Linux.
The history can help you understand why thigns are they way they are in UNIX and Linux.
Of particular concern are:
the small storage space of early computers which resulted in short command names and one character options
the switchover from teletype I/O to video terminal I/O
the use of eight bit bytes, ASCII characters, and plain text for interprocess communication
treating files as collections of bytes and devices, directories, and certain kinds of inter-process communications as files
the use of small, single-purpose programs that can be easily combined together to perform complex tasks
command line interface
Before the widespread introduction of graphic user interfaces (GUI), computers were controlled either by punched cards, paper tape, or magnetic tape (a batch system) or a command line interface (CLI) using an interactive terminal (originally, some variation of a teletype machine from the telegraph technology). The earliest computers were controlled by front panel lights and switches or even by directly changing the wiring.
The command line interface on interactive terminals was a major advance. Because of limitations of the early hardware (at a time when a computers entire memory might be measured in hundreds of bytes), the first CLIs compressed the number of characters, using two or three letter abbreviations for commands and single character switches for options to commands.
The modern UNIX/Linux shells carry over this early limitation because there is the need to remain backward compatible and still run shell scripts that are decades old, but essential to continued operation of legacy systems.
This historical limitation makes it difficult for newcomers to figure out how to use a UNIX/Linux shell.
When UNIX came into existence digital computers had been in commercial use for more than a decade.
Mainframe computers were just starting to be replaced by minicomputers. The IBM 360 mainframe computer and clones by other manufacturers was still the dominant computer. The VAX, with its virtual memory addressing, was still in development. Microcomputers were just an experimental idea. The CDC mainframe, a forerunner of the more famous Cray supercomputers, was still the worlds fastest computer.
COBOL was the most common programming language for business purposes. FORTRAN was the most popular programming language for scientific and systems programming. PL/I was a common third language. ALGOL was dominate in the academic community.
Most data entry was still performed using punched cards. Directly connected terminals were typically teletypes (TTY), a technology originally developed for telegraph systems. New terminals combining a keyboard and a monitor were still rare. These were also called CRTs (for Cathode Ray Tube) or dumb terminals or smart terminals (depending on the capabilities). Unlike modern black letters on white background terminals (pioneered with the Apple Lisa and Apple Macintosh) and full color monitors (popularized with the Atari and Commodre Amiga personal computers), these monitors were a single color phosphor (usually green) on a dark gray background. Even though disk drives existed, they were expensive and had small capacities. Magnetic tape was still the most commonly used form of storage of large data sets. Minicomputers were making use of punched paper tape.
Interactive computing was still rare.
Bell Telephone Laboratories was still using the BESYS operating system from 1957. In 1964, Bell Labs decided to update their operating system, leading to a 1965 partnership between the Massachusetts Institute of Technology (MIT), AT&T Bell Labs, and General Electric to create an experimental operating system called Multics (MULTIplexed operating and Computing System) for the GE-645 mainframe computer. AT&T intended to offer subscription-based computing services over the phone lines, an idea similar to the modern cloud approach to computing.
While the Multics project had many innovations that went on to become standard approaches for operating systems, the project was too complex for the time.
Bell Labs pulled out of the Multics project in 1969.
Ken Thompson and Dennis Ritchie offered to design a new operating system using a DEC PDP-7 computer that was available at the time.
UNICS (UNIplexed operating and Computing System, a pun on MULTICS) was created at AT&Ts Bell Labs in 1969 by a group that included Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, Michael Lesk and Joe Ossanna.
This group of researchers, the last of the AT&T employees involved in Multics, decided to attempt the goals of Multics on a much more simple scale.
What we wanted to preserve was not just a good environment in which to do programming, but a system around which a fellowship could form. We knew from experience that the essence of communal computing, as supplied by remote-access, time-shared machines, is not just to type programs into a terminal instead of a keypunch, but to encourage close communication, according to Dennis Ritchie.
UNIX was originally intended as a programmers workbench. The original version was a single-user system. As UNIX spread through the academic community, more general purpose tools were added, turning UNIX into a general purpose operating system.
While Ken Thompson still had access to the Multics environment, he wrote simulations on Multics for UNIXs file and paging system.
Ken Thompson ported the Space Travel computer game from Multics to a Digital Equipment Corporation (DEC) PDP-7 he found at Bell Labs.
Ken Thompson and Dennis Ritchie led a team of Bell Labs researchers (the team included Rudd Canaday) working on the PDP-7 to develop a hierarchial file system, computer processes, device files, a command-line interpreter, and a few small utility programs.
Early work was done in a BCPL (Basic Combined Programming Language) a language intended for writing compilers and system software. BCPL was simplified and revised into the B programming language.
By the end of 1969, UNICS had a primitive kernel, an editor, an assembler, a simple shell command interpreter, and a few basic command utilities, including rm, cat, and cp.
The first UNIX command shell, called the Thompson shell and abbreviated sh, was written by Ken Thompson at AT&Ts Bell Labs, was much more simple than the famous UNIX shells that came along later. The Thompson shell was distributed with Versions 1 through 6 of UNIX, from 1971 to 1975.
In 1970 Dennis Ritchie and Ken Thompson traded the promise to add text processing capabilities to UNIX for the use of a Digital Equipment Corporation (DEC) PDP-11/20. The initial version of UNIX, a text editor, and a text formatting program called roff were all written in PDP-11/20 assembly language.
The PDP-11/20 computer had 24K of RAM. The operating system used 12K. The remaining 12K was split between application programs and a RAM disk. The file size limit was 64K and the disk size limit was 512K.
Soon afterwards roff evolved into troff with full typesetting capability. The first UNIX book, UNIX Programmers Manual, by Ken Thompson and Dennis Ritchie, was published on November 3, 1971. The book described more than 60 commands, including b (compile a B program), chdir (change working directory), chmod, chown, ls, and who.
By 1971, many fundamentally important aspects of UNIX were already in place, including file ownership and file access permissions.
The first commercial UNIX system was installed in early 1972 at the New York Telephone Co. Systems Development Center under the direction of Dan Gielan. Neil Groundwater build an Operational Support System in PDP-11/20 assembly language.
With funding from the Patent Department, the UNIX team upgraded to a DEC PDP-11/45.
In 1972, Dennis Ritchie and Ken Thompson rewrote the B programming language into C. Work started on converting UNIX to C. UNIX was originally written in assembly language and B, but by 1973 it had been almost completely converted to the C language. At the time it was common belief that operating systems must be written in assembly in order to perform at reasonable speeds. Writing UNIX in C allowed for easy portability to new hardware, which in turn led to the UNIX operating system being used on a wide variety of computers.
Ken Thompson invented the pipe in 1972. Pipes allow the output of one process to be used as the input for another. Pipes allow the UNIX philosophy of having many small programs that each do one function very well and then write scripts that combine these small utility programs to accomplish bigger tasks.
By 1973, UNIX was running at sixteen (16) sites, all within AT&T and Western Electric. UNIX was presented to the public in an October 1973 conference and within six months the number of sites running UNIX had tripled.
A version of UNIX was published in the July 1974 issue of the Coomunications of the ACM, leading to widespread requests for copies. Under the antitrust consent decree with the U.S. government, Bell Labs was required to give a free copy to anyone who requested it. Ken Thompson personally signed a note for many of these early copies.
Because C was a complete, platform-independent programming language and UNIXs more than 11,000 lines of code were written in C, it was possible to easily port UNIX to any computer platform. And UNIX did quickly spread to almost every available computer platform, becoming the first true universal operating system.
In fall of 1974, Ken Thompson went to the University of California at berkeley to teach for a year. Ken Thompson, Bill Joy, and Chuck Haley worked together to create the Berkeley version of UNIX, called the Berkeley Software Distribution, or more commonly BSD.
The souce code for BSD UNIX was widely distributed to students and other schools. Students at UC-Berkeley and other schools around the world worked on improvements and the BSD UNIX replaced the Bell Laboratories UNIX as the primary UNIX.
BSD UNIX added the vi editor, the C shell, the Sendmail email system, virtual memory, and support for TCP/IP (Transmission Control Protocol/Internet Protocol). Because email was built into the operating system, email was the method UNIX used for sending notifications to the system administrator of system status, reports, problems, etc.
The Fifth Edition of UNIX was released in 1975 and licensed to universities for free.
The PWB shell or Mashey shell, abbreviated sh, was a variation of the Thompson shell that had been augmented by John Mashey and others at Bell Labs. The Mashey shell was distributed with the Programmers Workbench UNIX in 1976.
The Bourne shell, created by Stephen Bourne at AT&Ts Bell Labs (in New Jersey) as a scripting language, was released in 1977 as the default shell in the Version 7 Unix release distributed to colleges and universities. It gained popularity with the publication of The UNIX Programming Environment by Brian W. Kernighan and Rob Pike. The book was the first commercially published tutorial on shell programming.
The Bourne shell provided process control, variables, regular expressions, flow control, input/output control, and functions.
In 1977, the University of California, Berkeley, released the Berkeley Software Distribution (BSD) version of UNIX, based on the 6th edition of AT&T UNIX.
The C shell, abbreviated csh, was created by Bill Joy, a graduate student at the University of California, Berkeley. With additional work by Michael Ubell, Eric Allman, Mike OBrien, and Jim Kulp, it was released in the 2BSD release of BSD Unix in 1978.
The C shell offered command history, aliases, file name completion, and job control.
It turned out that while the C shell was easier to use than the Bourne shell, it failed miserably as a scripting language.It became common to use the C shell for everyday interactive computing and to use the Bourne shell for script programming.
The improved C shell, abbreviated tcsh, was created by Ken Greer by September 1975 and merged into the C shell in December 1983. Ken Greer based the shell on the TENEX operating system (hence, the t in tsch). Mike Ellis, Paul Placeway, and Christos Zoulas made major contributions to tcsh.
The release of the Seventh Edition of UNIX in 1978 led to the divergence of UNIX on the System V (Bell Labs) and BSD (Berkeley) paths. System V was often called sys-five. System V was the for pay version and BSD was the free open source version.
The Korn shell, abbreviated ksh, was created by David Korn at AT&Ts Bell Labs and announced at USENIX on July 14, 1983. Mike Veach and Pat Sullivan were also early contributors. The Korn shell added C shell features to the Bourne shell (command history and history substitution, command aliases, and file name completion). The Korn shell also added arrays and built-in integer arithmetic.
When the AT&T broke up in 1984 into Baby Bells (the regional companies operating local phone service) and the central company (which had the long distance business and Bell Labs), the U.S. government allowed them to start selling computers and computer software.
AT&T gave academia a specific deadline to stop using encumbered code (that is, any of AT&Ts source code anywhere in their versions of UNIX). This led to the development of free open source projects such as FreeBSD, NetBSD, and OpenBSD, as well as commercial operating systems based on the BSD code.
Meanwhile, AT&T developed its own version of UNIX, called System V. Although AT&T eventually sold off UNIX, this also spawned a group of commercial operating systems known as Sys V UNIXes.
UNIX quickly swept through the commercial world, pushing aside almost all proprietary mainframe operating systems. Only IBMs MVS and DECs OpenVMS survived the UNIX onslaught.
Some of the famous official UNIX versions include Solaris, HP-UX, Sequent, AIX, and Darwin. Darwin is the UNIX kernel for Apples OS X, AppleTV, and iOS (used in the iPhone, iPad, and iPod).
The BSD variant started at the University of California, Berkeley, and includes FreeBSD, NetBSD, OpenBSD, and DragonFly BSD.
The original Sun OS was based on BSD, but Solaris V5 was based on System V, release V.
Most modern versions of UNIX combine ideas and elements from both Sys-V and BSD. HP-UX and Solaris are primarily System V, while AIX and Mac OS X are hybrids of both flavors of UNIX.
Other UNIX-like operating systems include MINIX and Linux.
In 1983, Richard Stallman founded the GNU project, which eventually provided the tools to go with Linux for a complete operating system.
In 1986, Maurice J. Bach of AT&T Bell Labs published The Design of the UNIX Operating System, which described the System V Release 2 kernel, as well as some new features from release 3 and BSD.
In 1987, Andrew S. Tanenbaum released MINIX, a simplified version of UNIX intended for academic instruction.
bash, which stands for Bourne Again SHell, was created by Brian Fox for the Free Software Foundation and first released on June 7, 1989. bash combined features from the Bourne shell, the C shell, and the Korn shell. Bash also introduced name completion for variable names, usernames, host names, commands, and file names, as well as spelling correction for pathnames in the cd command, arrays of unlimited size, and integer arithmetic in any base between 2 and 64. bash is now the primary shell in both Linux and Mac OS X.
The Z shell, abbreviated zsh, was written by Paul Flastad in 1990 when he was a student at Princton University.
The Linux operating system was first released on September 17, 1991, by Finnish student Linus Torvalds. With the permission of Andrew S. Tanenbaum, Linus Torvalds started work with MINIX. There is no MINIX source code left in Linux. Linux Torvalds wrote Linux using the GNU C compiler running on MINIX on an Intel 80386 processor.
Linus Torvalds started work on open source Linux as a college student. After Mac OS X, Linux is the most widely used variation of UNIX.
Linux is technically just the kernel (innermost part) of the operating system. The outer layers consist of GNU tools. GNU was started to guarantee a free and open version of UNIX and all of the major tools required to run UNIX.
In 1992 Unix System Laboratories sued Berkeley Software Design, Inc and the Regents of the University of California to try to stop the distribution of BSD UNIX. The case was settled out of court in 1993 after the judge expressed doubt over the validity of USLs intellectual property.
comments, suggestions, corrections, criticisms
free music player coding example
Coding example: I am making heavily documented and explained open source code for a method to play music for free almost any song, no subscription fees, no download costs, no advertisements, all completely legal. This is done by building a front-end to YouTube (which checks the copyright permissions for you).
UNIX used as a generic term unless specifically used as a trademark (such as in the phrase UNIX certified). UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Ltd.
Names and logos of various OSs are trademarks of their respective owners.