UNIX
Beginnings of Unix
After being withdrawn from project Multics Ken Thompson and Dennis Richie started writing UNIX in 1969 at AT&T Bell Labs.
Ken Thompson and Dennis Richie found themselves at the Bell Labs without much hardware or funding.
Having to resort to discarded hardware and influenced by their experience of Multics, they start developing UNIX, a super slim operating system, that could run in hardware available and yet include some of appealing features of Multics.
Features of UNIX
Some of the features of UNIX were influenced from Multics,
- it was time-sharing system, allowing for mutiples users to login to the machine
ssh username@machineIP
- included the shell: a program which performs command line interpretation **
whoaim
pwd
print working directory - where am I?date
users
print the user names of users currently logged in to the current hosthistory
commands' history
- tree-structured file system
tree ~/
list contents of home (~ == /home/username ) in a tree-like formatls ~
list files and directories in your user home ( ~ == /home/username )ls .
list files and directories in current directory ( . == current dir )ls ../
list files and directories in parent directory ( . == current dir )ls foo/
list files and directories in child foo/ directoryls /
list files and directories in root ( / == root )
Others emerged from the development and use of the system and crystallized into the Unix Philosophy:
- Write programs that do one thing and one thing well
ls
lists files in a directorycat
outputs content of filewc
counts number of words in file
- Write programs that work together
echo "hello UNIX world" | sed 's/o/0/g' | sed 's/e/3/g' | sed 's/l/1/g' | figlet
- Write programs that handle text streams, because that is a universal interface
man -a intro | espeak
Linux introduction to user commands.
Distribution of UNIX
Although UNIX was property of Bell Labs and AT&T it was not commercialized.
As AT&T was a state owned monopoly that controlled the US phone service it was legally forbidden to get into the software market.
Instead of making into a market, UNIX remained more of non-commercial. For a low price UNIX could be installed and changed to create derivatives. Yet UNIX's and its derivatives could only be distributed by AT&T. (How was Minix distributed???)
Source code
Rather than distributing UNIX and its tools only as binary files, its source code was an integral part of distribution.
Given the lack of documentation in its early years, the availability of source code made possible for users to study and understand undocumented parts of the system.
In Linux distributions download the source code is also possible, by instructing the package manager apt-get to --download-only the source code for cowsay program or any other program sudo apt-get --download-only source cowsay
_______________________________________ ( apt-get --download-only source cowsay ) --------------------------------------- o ,-^-. o !oYo! o /./=\.\______ ## )\/\ ||-----w|| || || Cowth Vader
Modifications & Distribution
The availability of the source code also allowed users to modify, fix and improve parts of the system, by changing its source code.
These changes constituted a significant development contribution to official distribution of UNIX, and Thompson and Richie eagerly integrated them into the official distribution.
What constituted a technical development brought unclarity to the ownership of UNIX. With code written by several users mingling with code written at Bell Labs was UNIX still the property of AT&T?
To go with the unclear ownership informal distribution where a tape with changes was circulated informally outside AT&T control.
man pages
Man(ual) pages - online documentation found on a Unix or Unix-like operating system - began to be written in 1971.
Combined with the availability of the source code, the documentation of the system and its tools made UNIX a popular teaching tool.
Currently, nearly all applications come with a man page, which can be called with man application_name
.
But also components of the operating system have man pages, such as files, system overview.
An extensive list Linux of man pages can be found in https://www.kernel.org/doc/man-pages/
Forking UNIX
every thing is a file
Forking of UNIX
- Linux distributions
- package managers: aptitude
- Mac OsX
- homebrew http://brew.sh/