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.
Unix history
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).
Create your own copy from the original source code/ (presented for learning programming).
This section is under the category of owning cirticism.
In response to a posting about my article collecting social media, Moderator +Andrew Smith (Technology addict, Web Developer, API guru, futsal and football wannabe, and all round nice guy!, Swordfox Design, arrowtown, new zealand) of the Google+ community Web Developers, Web Designers, Web Coding claims Quite frankly this is self promotion, and your site is not of great quality. I can see how +Joost SchuurÊ would think this of not high enough a standard.
Building a free downloadable text book on computer programming for university, college, community college, and high school classes in computer programming.
If you like the idea of this project, then please donate some money.
send donations to: Milo
PO Box 1361
Tustin, California 92781
Supporting the entire project:
If you have a business or organization that can support the entire cost of this project, please contact Pr Ntr Kmt (my church)
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.