LIS508 lecture 8: looking at linux - PowerPoint PPT Presentation


PPT – LIS508 lecture 8: looking at linux PowerPoint presentation | free to view - id: 146043-Y2VkO


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation

LIS508 lecture 8: looking at linux


In the 1940s and 1950s, all computers were personal computers in the sense that ... MINIX, by Andrew Tanenbaum, used a microkernel design with only 1600 lines of C ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 36
Provided by: kri145


Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: LIS508 lecture 8: looking at linux

LIS508 lecture 8 looking at linux
  • Thomas Krichel
  • 2002-11-11

  • History of unix and linux
  • Using linux
  • Free software

Early Computing History
  • In the 1940s and 1950s, all computers were
    personal computers in the sense that a user would
    sign up to use the machine and then take over the
    whole machine for that period.
  • The early 1960s were dominated by batch systems
    in which a user would submit a job on punched
    cards and wait, usually hours, before any printed
    output appeared.

Early Computing History
  • To get around this unproductive environment, the
    concept of timesharing was invented by Dartmouth
    College and M.I.T.
  • The M.I.T system CTSS (Compatible Time Sharing
    System) was an enormous success.
  • M.I.T., Bell Labs, and General Electric created a
    second generation timesharing system named
    MULTICS (Multiplexed Information and Computing

Early UNIX History
  • At Bell Labs, Ken Thompson decided to write a
    stripped down version of MULTICS for the very
    small PDP-7 minicomputer which he called UNICS.
  • Dennis Ritchie, also at Bell Labs, joined
    Thompson in further developments of what was now
    called UNIX.
  • Together they ported the system the the larger
    and very popular PDP-11/20 and PDP-11/45

Early UNIX History
  • Thompson also rewrote the operating system in
    high level language of his own design which he
    called B.
  • The B language lacked many features and Ritchie
    decided to design a successor to B which he
    called C.
  • They then rewrote UNIX in the C programming
    language to aid in portability.

(No Transcript)
Early UNIX History
  • In 1974, Ritchie and Thompson published a paper
    about UNIX and received the prestigious ACM
    Turing Award.
  • This publication stimulated many universities to
    request a copies of UNIX.
  • Since Bell Labs, part of ATT, was not allowed
    to be in the computer business, it licensed UNIX
    to universities.
  • Also, at that time, the PDP-11 series was the
    workhorse of most computer science departments.
  • Result UNIX was a hit on campus.

Early UNIX History
  • In Version 6, the source code of UNIX was 8200
    lines of C and 900 lines of assembler.
  • The first portable version arrived with Version 7
    which had 18,800 lines of C and 2100 lines of
  • By the 1980s the use of UNIX was widespread with
    many vendors selling their own versions based on
    Version 7.

  • One of the many universities that had received
    license for UNIX was the University of California
    at Berkeley.
  • Aided by many government grants, Berkeley
    released an improved version named 1BSD (First
    Berkeley Software Distribution)
  • In subsequent, versions Berkley added many new
    features including a new visual editor (vi) and
    a new shell (csh).

Two UNIX Versions
  • Because of these and other enhancements, many
    companies based their UNIX on Berkeleys version
    as opposed to ATTs so-called System V.
  • By the late 1980s, two different and somewhat
    incompatible versions of UNIX were in widespread
    use 4.3 BSD and System V release 3.

UNIX Standards
  • In addition, every vendor added its own
    nonstandard enhancements.
  • In an attempt to unify the troops, the IEEE
    Standards Board undertook the POSIX Project (POS
    for Portable Operating System) and IX to make it
    UNIX like.
  • POSIX 1003.1 emerged as a common ground standard.
  • 1003.1 is the intersection of System V and BSD.
    (a feature had to be on both to be included in
    the standard)

UNIX Standards
  • The POSIX standard defined a set of library
    procedures and systems calls that all compliant
    UNIX systems.
  • It appeared that the split between System V and
    BSD had been somewhat dealt with.
  • Unfortunately, a funny thing happened on the way
    back form the standards meeting.

UNIX Standards
  • A group of vendors led by IBM, DEC,
    Hewlett-Packard, and others formed the OSF (Open
    Software Foundation) to standardize an enhanced
    version of UNIX in an attempt to derail ATTs
    efforts to regain control of UNIX.
  • ATT, Sun, UNISYS, Data General, and other
    companies countered and formed UI (UNIX
    International) based on System V.

UNIX Like Systems
  • In a new trend, UNIX like operating systems began
    to appear.
  • MINIX, by Andrew Tanenbaum, used a microkernel
    design with only 1600 lines of C and 800 lines of
    assembler in its first version.
  • In 1991, a Finnish student named Linus Torvalds
    released another UNIX clone named Linux version

  • Linux is a monolithic design rather than a
    microkernel design. (9,300 lines of C and 950 of
  • Linux quickly grew in size and functionality.
  • Version 1, shipped in 1994, contained about
    165,000 lines of code.
  • Version 2 in 1996 contained about 470,00 lines of
    C and 8000 lines of assembler.
  • Linux is released under the GNU public licence
    (we will cover this later).

In the meantime, in the trenches
  • In 1992, Berkeley decided to terminate BSD
    development with one final free release - 4.4BSD.
  • ATT sued claiming the version contained ATT
  • During the lawsuit, Berkeley was not allowed to
    distribute 4.4BSD thus giving time for Linux to
    become established.
  • Had the lawsuit not occurred, there would have
    been serious competition between two freely

ATTs Exit
  • ATT eventually decided to focus on the long
    distance telephone business and sold its UNIX
    business to Novel in 1993.
  • In turn, Novel sold it to Santa Cruz Operations
    in 1995.
  • But who owned this version of UNIX was almost
    irrelevant since so many companies already had

UNIX Consolidation
  • Even though there have been many vendors and many
    version of UNIX over the last few decades, the
    market is now beginning to consolidate.
  • Hewlett-Packard HP/UX
  • Sun Solaris
  • Macintosh OS X

Linux Distributions
  • Linux itself is free. It is packaged, provided
    with installation and management tools, and made
    available for a small fee by various vendors on
  • These packages are known as distributions.
  • Some common distributions are
  • Red Hat -- SuSE --Mandrake
  • Debian -- Slackware
  • Differences
  • Locations of files (configuration, binaries,
  • GUI
  • Security, efficiency, etc.

UNIX Philosophy
  • Make each program do one thing well.
  • These programs are sometimes called tools.
  • Expect the output of every program to be the
    input to another yet unknown program.
  • Simple tools can be connected to accomplish a
    complex task
  • Do not hesitate to build new tools
  • The UNIX tool library keeps growing

UNIX Philosophy
  • The UNIX philosophy has not proven to be the best
    for all applications.
  • For example, there are lots of text manipulation
    tools that can be put together to accomplish a
    complex word processing task but the trend is
    definitely toward integrated word processing

Layers in the UNIX System
User Interface
Library Interface
Standard Utility Programs (shell, editors,
compilers, etc.)
System Interface calls
User Mode
Standard Library (open, close read, write, etc.)
UNIX Operating System (process management, memory
management, the file system, I/O, etc.)
Kernel Mode
Hardware (cpu, memory, disks, terminals, etc.)
UNIX Structure
  • The kernel is the core of the UNIX system,
    controlling the system hardware and performing
    various low-level functions. The other parts of
    the UNIX system, as well as user programs, call
    on the kernel to perform services for them.
  • The shell is the command interpreter for the UNIX
    system. The shell accepts user commands and is
    responsible for seeing that they are carried out.

Famous shells
  • The Bourne shell /bin/sh (default)
  • The Korn shell /bin/ksh
  • The C shell /bin/csh
  • The Bourne Again Shell /bin/bash
  • The Z shell /bin/zsh
  • In linux, /bin/sh is usually /bin/bash

UNIX Structure
  • Hundreds of applications are supplied with the
    UNIX system. They support a variety of tasks
  • copying files
  • editing text
  • performing calculations
  • developing software
  • Serving web pages etc

Using Linux/UNIX
  • Depends on how it is set up. The following are
    true on wotan, on other machines it may be
  • Wotan runs Debian GNU/Linux.
  • / is the root directory
  • /home/user (aka user) is the home directory of
    the user user.
  • ls l lists files in long format.

Permission model
  • Permission of files are give to the owner, the
    group, and the rest of the world.
  • A group is a grouping of users. Unix allows to
    define any number of groups and make users a
    member of it.
  • The rest of the world are all other users who
    have access to the system, including public
    access on a web server, for example.

First element in ls -l
  • Type indicator
  • d means directory
  • l means link
  • - means ordinary file
  • 3 letters for permission of owner
  • 3 letters for permission of group
  • 3 letters for permission of rest of the world
  • r means read, w means write, x means execute

Change permission chmod
  • A permission is a number
  • 4 is read
  • 2 is write
  • 1 is execute
  • Permissions are three numbers, for owner, group
    and rest of the world.
  • Example chmod 764 file
  • Directories need to be executable to get in them…

Bash features
  • Bash is the default shell on wotan
  • cd is a command to change directory
  • File names and command names can be completed
    with TAB
  • The command history can be activated with the
    arrow keys of the keyboard

Copying and removing
  • cp file copyfile
  • scp user_at_machinefile user_at_machinefile
  • User is a user
  • Machine is a machine
  • File is the path to a file
  • Of course you will need permissions here!
  • rm file there is no recycling bin!!
  • -r flag copies and deletes recursively

Directories and files
  • mkdir file makes a directory
  • rmdir file removes it
  • touch file
  • makes a new empty file
  • sets the time on an existing file
  • more file
  • Pages contents of file, no way back
  • less file
  • Pages contents of file, u to go back, q to

Editing files
  • There are many file editors available.
  • I use emacs, because I am a geek.
  • My students use nano. Invoque it with
  • nano filename
  • If nano in not there, try pico.

  • Thank you for your attention!