LIS508 lecture 6: looking at linux - PowerPoint PPT Presentation

About This Presentation
Title:

LIS508 lecture 6: looking at linux

Description:

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:71
Avg rating:3.0/5.0
Slides: 34
Provided by: kric2
Learn more at: https://openlib.org
Category:

less

Transcript and Presenter's Notes

Title: LIS508 lecture 6: looking at linux


1
LIS508 lecture 6looking at linux
  • Thomas Krichel
  • 2003-11-11

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

3
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.

4
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
    Service).

5
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
    minicomputers.

6
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.

7
(No Transcript)
8
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.

9
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
    assembler.
  • By the 1980s the use of UNIX was widespread with
    many vendors selling their own versions based on
    Version 7.

10
BSD UNIX
  • 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).

11
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.

12
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)

13
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.

14
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.

15
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
    0.01.

16
Linux
  • Linux is a monolithic design. (9,300 lines of C
    and 950 of assembler)
  • 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 license,
    which, very basically means that anyone can copy
    and change it.

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

18
GNU
  • GNU is a project started by Richard M. Stallman
    (RMS) to write a completely free implementation
    of Unix available.
  • GNU stands for GNU is not Unix
  • Most of Unix has been rewritten by him and his
    friends.
  • Many other software packages have been released
    for free.
  • My favorite linux distribution has over 13,000
    packages.

19
This is Richard Stallman.
20
free software according to RMS
  • Free software comes with four freedoms
  • The freedom to run the software, for any purpose
  • The freedom to study how the program works, and
    adapt it to your needs
  • The freedom to redistribute copies so you can
    help your neighbor
  • The freedom to improve the program, and release
    your improvements to the public, so that the
    whole community benefits

21
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.

22
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

23
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

24
Using Linux/UNIX
  • Depends on how it is set up. The following are
    true on wotan, on other machines it may be
    different.
  • Wotan runs Debian GNU/Linux.

25
directories
  • / is the root directory
  • /home/user (aka user) is the home directory of
    the user user.
  • ls l lists files in long format
  • The command to change directory is cd.
  • The directory above the current one is ..
  • just like it was in old DOS.

26
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.

27
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

28
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

29
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

30
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

31
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
    quit

32
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.

33
http//openlib.org/home/krichel
  • Thank you for your attention!
Write a Comment
User Comments (0)
About PowerShow.com