UNIX

From XPUB & Lens-Based wiki

Beginnings of Unix

After being withdrawn from project Multics Ken Thompson and Dennis Richie started writing UNIX in 1969 at AT&T Bell Labs.

Thompson&Richie.jpg

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 host
    • history commands' history
  • tree-structured file system
    • tree ~/ list contents of home (~ == /home/username ) in a tree-like format
    • ls ~ 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/ directory
    • ls / 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 directory
    • cat outputs content of file
    • wc 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

man pages
every thing is a file


Forking of UNIX

  • Linux distributions
    • package managers: aptitude