An Introduction to LINUX - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

An Introduction to LINUX

Description:

By 1990 only a new kernel was needed to make a completely free UNIX operating system ... 3: /dev/hda4 /home Rest of disk. Using LINUX Users ... – PowerPoint PPT presentation

Number of Views:151
Avg rating:3.0/5.0
Slides: 26
Provided by: Iain
Category:

less

Transcript and Presenter's Notes

Title: An Introduction to LINUX


1
An Introduction toLINUX
  • Iain Moffat

2
CONTENTS
  • What is Linux ?
  • Where did Linux come from ?
  • Whats inside Linux ?
  • What is different from Windows ?
  • What can Linux do ?
  • Linux as a server
  • Linux as a desktop PC
  • Where do I get Linux ?
  • Installing Linux
  • Using Linux (demo)

3
What is Linux ?
  • A free general purpose operating system
  • 32/64 bit
  • Multiuser Multitasking
  • Secure
  • LINUX itself is the kernel which provides
  • Input/Output device drivers and networking
  • Multitasking and interprocess communications
  • Security
  • A (mostly) IEEE 1003.1 (POSIX) compatible
    interface to applications
  • A full distribution consists of
  • The LINUX kernel
  • GNU C compiler, C library and utilities
  • MIT X-Windows
  • A free window manager (one of many available)
  • Many free desktop and server applications

4
Linux Timeline
1970 1980 1990 2000
C Programming Language
ATT UNIX IN C
UNIX 1
System V
BSD UNIX
FreeBSD and NetBSD
Commercial UNIXes (SunOS, HP-UX, AIX, .)
IEEE 1003.1 POSIX STANDARD
LINUX Kernel
LINUX Distributions
Free Software Foundation GNU Project
MIT X
MS-DOS
Win 3.x
32-Bit Windows
5
Where did Linux come from?
  • ATT Bell labs developed UNIX in 1969
  • Rewritten in C language from 1973 becoming
    first truly portable OS
  • University of California at Berkley improved and
    extended UNIX from 1977 releasing their BSD
    code for free
  • Free Software Foundation and X-Windows projects
    at MIT provided compiler, windowing, and free
    versions of most UNIX applications from 1985
  • Application to Kernel interfaces documented by
    IEEE (1003.1 POSIX) and ATT in 1988
  • Code for a 16-bit PC unix-like OS (MINIX)
    published in book form by Andrew Tannenbaum in
    1987
  • By 1990 only a new kernel was needed to make a
    completely free UNIX operating system
  • Linus Torvalds at the University of Helsinki
    released the first LINUX kernel in 1991
  • Alan Cox at the University of Swansea added a
    robust IP stack (and amateur radio AX25) for
    networking
  • Various offshoots of Berkley BSD with kernels
    free of ATT code released from 1993
  • Linux succeeded in competition with BSD due to
    optimisation for the 386/486 PC and 2 years start
    on application porting
  • Kernel version 2 introduced dynamically loaded
    modules allowing extension without recompiling
  • Continuing development since 1991 now at Kernel
    version 2.6.26

6
Whats inside Linux ?
User Process
Server Process
Application
Window Manager
X-Windows
Shell
Application
C Library
Kernel
Loadable Modules
Standard device drivers
HARDWARE
7
Linux Components
  • Kernel
  • Provides I/O drivers and basic services such as
    security, task scheduling and networking
  • C Library
  • Presents kernel services to applications in a
    machine independent, standard way
  • Shell
  • Provides a text based user interface for file
    manipulation and program control
  • Includes powerful scripting capabilities
  • Multiple shells available c shell, ksh
    (POSIX) and bash (Linux default shell)
  • X-Windows
  • Provides basic windowing GUI, fonts, keyboard and
    mouse support
  • Works equally well for local users and remote
    access over a LAN
  • Window Manager
  • Provides a usable WIMP interface on top of
    X-Windows
  • Classic interface TWM, MWM
  • Win95 Interface IceWM, FVWM
  • Complete environments Gnome, KDE
  • Applications
  • Daemons run independently of a user session (like
    a Windows NT service)
  • CRON the batch program scheduler

8
Linux File System
  • Unified (all files and devices in one structure)
  • No drive letters
  • extra drives are mounted as directories under
    the root file system
  • Structure varies between distributions
    typically
  • /boot kernel image used to boot the machine
  • /bin basic OS utilities
  • /dev files representing I/O devices
  • /dev/hda1 first IDE hard disk
  • /dev/uba1 first USB storage device
  • /dev/console system keyboard and (textmode)
    display
  • /dev/null null device (consumes data sent to it)
  • /etc system configuration files
  • /lib libraries (equivalent to Windows DLLs)
  • /mnt mount point for removable disks
  • /proc Kernel memory presented as a virtual
    directory and files
  • /tmp temporary files
  • /usr user applications and libraries
  • usr/bin most user programs
  • /usr/X11R6/bin X11 graphical programs

9
Linux Windows
Feature
Linux
Windows XP 2003
Multitasking
YES
YES
Multiuser
YES
PARTLY
File System
UNIFIED
Separate Drives
Modular Kernel
YES
NO
Modular OS
YES
NO
Run from CD
YES
NO
Minimum Disk
1.44MB
Nearly 1GB
Free
YES
NO
Support
Via Distributor
YES
Source code available
YES
NO
As a terminal server with extra client access
licenses only
10
Linux Security Availability
Feature
Linux
Windows XP 2003
Admin A/C only needed for Admin
YES
NO
DLL Versioning works
YES
NO
Separation of apps and OS files
GOOD
PARTIAL
Separation of Admin App users
YES
NO
Unused services can be disabled
YES
PARTIAL
Unused components removable
YES
NO
Log to remote server
YES
If you buy MoM
Free Updates
Depends on distribution
NO
Security Patching
Via Distributor or Author
YES
Source code available to audit
YES
NO
More due to bad application design and not
using OS capabilities than OS itself
11
What can Linux do?
  • As a server
  • Web Server Apache with Perl or PHP
  • Database MySQL (or Postgres/SQL)
  • Firewall (built in to kernel)
  • Network Mgmt MRTG, Snort IDS, Nagios ..
  • File Server SAMBA
  • Print Server LPD, Ghostscript, CUPS
  • As a desktop
  • Office Suite openoffice.org, abiword,
  • Photo Editing the GIMP, xv
  • Amateur Radio TNOS, xastir, AX25, .
  • Electronics CAD kicad, vutrax, Alliance VHDL
    compiler
  • Mechanical CAD too many to list .

12
Where do I get Linux ?
  • The Hard Way
  • Download GCC compiler from www.fsf.org
  • Download and build kernel from www.kernel.org
  • Download and build utilities and applications
  • The Easy Way
  • Buy a Linux CD-ROM and reboot your PC
  • Red Hat distribution (owned by Intel)
  • SuSE distribution (owned by Novell)
  • Debian (MIT based, non commercial, downloadable)
  • Many many others
  • The Cheap Way
  • Download a boot CD or Floppy image
  • Toms Root/Boot floppy http//www.toms.net/rb/
  • Knoppix live linux http//www.knopper.net/knoppix
    /index-en.html
  • DSL live linux http//www.damnsmalllinux.org
  • Debian http//www.debian.org
  • Make a disk
  • Boot your PC from the disk
  • Download additional components as required

13
Linux Distributions
  • Classic CD-Based
  • Red Hat Enterprise Linux http//www.redhat.com
  • SuSE http//www.novell.com/linux/
  • Mandrake / Mandriva http//www.mandriva.com/
  • Slackware http//www.slackware.com
  • Downloadable
  • Debian http//www.debian.org
  • Ubuntu http//www.ubuntu.com/
  • Red Hat Fedora http//www.fedoraproject.org
  • Puppy Linux http//www.puppylinux.com
  • CD or Floppy boot and run
  • Knoppix http//www.knopper.net/knoppix/index-en
    .html
  • DSL http//www.damnsmalllinux.org
  • Source Download
  • Gentoo http//www.gentoo.org/
  • SourceMage http//www.sourcemage.org

14
Installing Linux from CD-ROM
  • Insert CD-ROM
  • Boot the PC
  • Installer program loads into RAM disk
  • Answer questions from installer
  • Disk layout
  • IP networking configuration
  • Which optional programs to install
  • Which window manager
  • Wait for software to be copied to hard disk
  • Reboot
  • Set up user accounts and passwords

15
Linux Disk Layout
  • For a basic single disc drive PC
  • Minimum 1GByte needed for basic install
  • Recommended 4 Gbytes for X, webserver, mail etc
  • Partitions
  • 0 /dev/hda1 root file system 500MB
  • 1 /dev/hda2 /usr 1500MB
  • 2 /dev/hda3 /var 1500MB
  • 3 /dev/hda4 /home Rest of disk

16
Using LINUX Users
  • A UNIX (or Linux) system must have an
    administrator
  • The account is called root
  • root owns all critical files and processes
  • root can read or change all data in the system
  • Use the root account with care !
  • There may be one or more normal users
  • User names are up to 8 characters
  • The program to add users is normally useradd
    but GUI alternatives exist
  • Users are members of groups which give access to
    shared files
  • The user list is a text file - /etc/passwd
  • The group list is a text file - /etc/group
  • Application programs often have a user account
    so that their files do not have to be owned by
    root and their processes do not have to run as
    root
  • Passwords
  • Encrypted Passwords are stored in /etc/shadow
    rather than /etc/passwd
  • Password encryption is non reversible
  • what you type in is encrypted and compared with
    the stored encrypted password.
  • A special program passwd is used to change
    passwords
  • The root user can change anyones password
  • Other users can only change their own password

17
User and Group files
Note 1) A password entry of x in /etc/passwd
means look in /etc/shadow2) A password entry
of in /etc/shadow means account can not log
in
18
Using Linux File Permissions
  • Files and directories have separate rules for
  • Owner
  • Group
  • World (all other users)
  • For each of these three permissions are defined
  • Read
  • Write
  • Execute (for files) or List (for directories)
  • Two additional permissions are used
  • The sticky bit allows users to only remove or
    rename files that they own, in a world writable
    directory
  • The SUID and SGID bits make a program run with
    the ID of the owner and group of the program
    (rather than the user running it)
  • Changing ownership and permissions
  • Use the chown command to change the owner and
    group of a file
  • Use the chmod command to change the permissions
    of a file

19
Using LINUX basic commands
  • USER COMMANDS
  • man command print manual for command
  • cat file1 type file1 (as text) on screen
  • head file1 type first 10 lines of file1 on
    screen
  • tail file1 type last 10 lines of file1 on
    screen
  • lpr file1 print (text) file 1 on default
    printer
  • lpq show printer queue
  • ls list directory
  • ls l long directory listing
  • cp file1 file2 copy file1 to file2
  • cp file1 dir1 copy file1 into dir1
  • cp r dir1 dir2 copy dir1 to dir2
  • mkdir dir1 create directory dir1
  • mv file1 file2 move/rename file1 to file2
  • passwd change my passwd
  • ps list my processes
  • ps auxw list all processes
  • kill NNNN kill process NNNN gracefully
  • kill -9 NNNN kill process NNNN right now
  • ROOT COMMANDS
  • sync complete all pending I/O now
  • shutdown halt the system
  • reboot reboot the system
  • ( best practice is to use sync sync reboot )
  • useradd add user (see man page 1st)
  • passwd user1 change password for user1
  • mount device dir1 mount device as dir1
  • chown user file change owner of file to user
  • chown r user dir change owner of directory
  • chmod mode file change permissions of file
  • su username become user username
  • MODES
  • 777 world writable all users can read write exec
  • Normal directory owner rwx, others read list
  • 700 Private file or dir only owner can see it
  • 755 Normal program owner rwx, others read exec
  • Normal data file owner rw, others readonly
  • I/O Redirection and pipes

20
Using Linux The Desktop
21
Using Linux Configuration
22
Puppy Linux
23
KDE Desktop
24
Gnome Desktop
25
ANY QUESTIONS ?
  • Slides will be available athttp//local.iee.org
    /anglian/LectureSlides/ap15may08.ppt
  • Thank you for listening !
Write a Comment
User Comments (0)
About PowerShow.com