Every Thing You Should Know
About Linux
Prabhaker Mateti
Department Of Computer Science and Engineering
Wright State University
May 2008
Are you sure you have not used
Linux already?
May 2008
Mateti-Everything-About-Linux
3
Linux runs on …
PDA? Smart Phone?
 GPS?
 TiVO?
 Router? Wireless AP?
 Wrist watch?
 Car? Airplane?

May 2008
Mateti-Everything-About-Linux
4
Linux Cell Phones





Motorola Rokr E8
Quad GSM/GPRS
Multi-codec music
player
Full HTML browser
Jan. 10, 2008
May 2008
Mateti-Everything-About-Linux
5
Linux Cell Phones



http://openmoko.org
Open source
hardware
Free CAD files
May 2008
Mateti-Everything-About-Linux
6
Linux on iPods




uCLinux + podzilla
www.ipodlinux.org/
iPOds to 5.5G
iPod Nano 1G
May 2008
Mateti-Everything-About-Linux
7
One Laptop Per Child


May 2008
Runs on Linux
Sugar “desktop”
promotes sharing and
learning.
Mateti-Everything-About-Linux
8
Google Linux Clusters

GFS: The Google File System

thousands of terabytes of storage across
thousands of disks on over a thousand
machines
150 million queries per day
 Average response time of 0.25 sec
 Near-100% uptime

May 2008
Mateti-Everything-About-Linux
9
Smallest Linux System







Mar. 28, 2005
DigiConnect ME
RJ-45 Plus
0.75 x 0.75 x 1.4 in
18 grams
2.4.27 uClinux
32-bit ARM7TDMI
May 2008
Mateti-Everything-About-Linux
10
Overview of the Rest of theTalk
1.
2.
3.
4.
5.
6.
7.
May 2008
Linux Internals
Distributions
Desktop Environments
Linux Clusters
Security
Open Source Software
Important Applications
Mateti-Everything-About-Linux
11
Linux Internals
Academic Def: An OS consists of
File Systems
 Virtual Memory Management
 Process Management
 Network Layer
 Input/Output Subsystem
 User Management
 (Booting the OS)
 [Collection of System Programs]

May 2008
Mateti-Everything-About-Linux
13
Academic Definition of Kernel
OS are expected to be implemented as
Layers
 Kernel is the inner most layer
 Layers are architecturally supported by
CPU privilege modes.
 Micro-kernel architecture

May 2008
Mateti-Everything-About-Linux
14
“Linux kernel”
The OS as we defined – boot – SysPrgs
 Monolithic
 As Files

/boot/vmlinuz
 /boot/initrd
 /lib/modules/*

single file
single file
about 3500 files
4 Million lines of code
 Several thousand contributors

May 2008
Mateti-Everything-About-Linux
15
Linux Kernels

Numbering Scheme: Major.Minor.Release
2.2 (1999)
 2.4 (2001)
 2.6 (2003)


Current Source Code Versions:
linux-2.6.25.3.tar.bz2 10-May-2008 46MB
 linux-2.4.36.4.tar.bz2 07-May-2008 30MB
 linux-2.2.26.tar.bz2
24-Feb-2004 15MB

May 2008
Mateti-Everything-About-Linux
16
“Linux” as used in this Talk



Linux Kernel
System Programs: /sbin, /usr/sbin
UI



Utilities


/bin, /usr/bin, …
Applications




Desktop Env: X11, KDE, Gnome, …
Shells: Bash, csh, ksh, …
Publishing: TeX, MetaPost, PS, PDF, …
Multimedia: Audio, Video
Sotware Development: Perl, Python, Ruby,
Servers



May 2008
Web
File
Compute
Mateti-Everything-About-Linux
17
K Desktop Environment (KDE)
4 Million lines of code
 Over 800 contributors help to develop
KDE.
 The translation team: about 300.
 KDE has about 20 official WWW mirrors in
12 countries.
 KDE has more than 106 official FTP
mirrors in over 39 countries

May 2008
Mateti-Everything-About-Linux
18
KDE Components

















aRts: Analog realtime synthesizer and sound daemon. KDE 4.0 uses Phonon
KDE-Libs: Various run-time libraries
KDE-Base: window-manager, desktop, panel, Konqueror
KDE-Network: KNode, KNewsticker, Kppp, ...
KDE-Pim: KMail, KAddressbook, KOrganizer, KPilot, ...
KDE-Graphics: Graphics applications such as KDVI, KGhostview, KPaint, KFax, ...
KDE-Multimedia: Noatun, KMidi, KSCD, ...
KDE-Accessibility: applications to improve computer access for disabled people...
KDE-Utilities: KEdit, KCalc, KHexEdit, KNotes, ...
KDE-Edu: Edutainment applications
KDE-Games: KAsteroids, KPat, KTetris, ...
KDE-Admin: Various tools to aid system administration
KDE-SDK: Script and tools which simplify development of KDE applications
KOffice: Integrated office suite
KDevelop: C/C++ Integrated Development Environment
KDE-Bindings: bindings for various languages (Python, Ruby, Perl, Java...)
KDEWebdev: Web Development Tool
May 2008
Mateti-Everything-About-Linux
19
Native Linux File Systems

Extended File System
Ext2
 Ext3
 Ext4


Other Journaling File Systems
ReiserFS
 SGI XFS
 IBM JFS

May 2008
Mateti-Everything-About-Linux
20
Linux Non-Native File Systems
NTFS5: Full read/write operations
 Native File Systems of every major OS
fully supported:

FAT, FAT16, FAT32 of Windows
 MacOS
 Solaris
 BSD

May 2008
Mateti-Everything-About-Linux
21
Distributed File Systems

Classic DFS
NFS
 AFS
 Samba for Windows


Linux is a rich test bed for DFS research
KOSMOS http://kosmosfs.sourceforge.net/
 Ceph http://ceph.newdream.net/
 Many encrypted file systems

May 2008
Mateti-Everything-About-Linux
22
Linux Distributions
Linux Distributions
Define “distribution”!
 Major Distributions

Debian, Ubuntu
 RedHat, Fedora
 Novell SuSe, Open Suse
 Mandriva
 Slackware


Minor Distributions

May 2008
1000+
Mateti-Everything-About-Linux
24
How Do Distributions Differ?

What is included in the default installation


Operating System
UI






Utilities
Selected Applicatins
Patches provided by the Distro
Installing New Components/Applications

Updates




Shells
GUI
Security
New versions
Browsing for Available Software
Look and Feel of the Initial Install
May 2008
Mateti-Everything-About-Linux
25
How Do Distributions Differ?

Versions of installed libraries



Configuration




/lib/
/usr/lib/
Location of Files
Syntax
GUI/command line tools
Distributions from Scratch

Build it from Source

May 2008
Gentoo
Mateti-Everything-About-Linux
26
Ubuntu


Ubuntu is a derivative of Debian
“Ubuntu will always be







“free to download,
“free to use and
“free to distribute to others.”
Desktop Edition
Server Edition
X86-32, x86-64, and Mac
Ubuntu, Kubuntu, Xubuntu, …
May 2008
Mateti-Everything-About-Linux
27
Linux Live CD/DVD
fully writable root filesystem
 hardware auto-detection
 can be installed to local hard disk
 can be installed on USB MSD
 Automated scripts to make a LiveDVD
from any distro
 http://www.linux-live.org/

May 2008
Mateti-Everything-About-Linux
28
Knoppix LiveDVD

General Purpose Linux



Excellent hardware detection
Large collection of applications




Try it without installing on HDD
KDE, …, fluxbox
Open Office, Emacs, gcc, …
Web browsers, …
Uncompresses on the fly


May 2008
Several GB of software
Relatively Slow
Mateti-Everything-About-Linux
29
Damn Small Linux
About 50 MB
 Can run without a HDD
 X11 Desktop
 Many useful applications

Office
 Web surfing
 Email
 Multimedia

May 2008
Mateti-Everything-About-Linux
30
Linux on a USB Drive


Install on a USB MSD as a HDD
Install a Live Image on USB MSD




Lab on Installing Linux on a USB Drive


On the fly uncompression
Fast installation
Relatively slow execution
http://www.cs.wright.edu/~pmateti/Courses/233-2008Spring/Labs/OS-on-USB/OSonUSBLab.htm
http://pendrivelinux.com/
May 2008
Mateti-Everything-About-Linux
31
Scientific Linux LiveDVD







By Fermilab, CERN, and other labs and
universities
LiveDVD 32bit/64bit with Gnome/KDE/Icewm
desktop
5.1 for i386 and x86_64 released on 2008-02-18
RedHat Enterprise Linux
Fully writable root filesystem
Hardware auto-detection
http://www.scientificlinux.org
May 2008
Mateti-Everything-About-Linux
32
Embedded Linux
uCLinux (Micro Controller Linux)
 Linux kernels 2.0, 2.4 and kernel 2.6
 collection of user applications
 libraries and
 tool chains
 uCLinux ported widely

May 2008
Mateti-Everything-About-Linux
33
Linux Clusters
Cluster Characteristics
Commodity off the shelf hardware
 Networked
 Common Home Directories
 Open source software and OS
 Support message passing programming
 Batch scheduling of jobs
 Process migration

May 2008
Mateti-Everything-About-Linux
35
Why are Linux Clusters Good?

Low initial implementation cost
Inexpensive PCs
 Standard components and Networks
 Free Software: Linux, GNU, MPI, PVM

Scalability: can grow and shrink
 Familiar technology, easy for user to
adopt the approach, use and maintain
system.

May 2008
Mateti-Everything-About-Linux
36
Example Clusters
July 1999
 1000 nodes
 Used for genetic
algorithm research by
John Koza, Stanford
University
 www.geneticprogramming.com/

May 2008
Mateti-Everything-About-Linux
37
Largest Cluster System








IBM BlueGene, 2007
DOE/NNSA/LLNL
Memory: 73728 GB
OS: CNK/SLES 9
Interconnect: Proprietary
PowerPC 440
106,496 nodes
478.2 Tera FLOPS on
LINPACK
May 2008
Mateti-Everything-About-Linux
38
Message Passing Interface (MPI)
http://www-unix.mcs.anl.gov/mpi/
 MPI-2.0 http://www.mpi-forum.org/docs/
 MPICH: www.mcs.anl.gov/mpi/mpich/ by
Argonne National Laboratory and
Missisippy State University
 LAM: http://www.lam-mpi.org/
 http://www.open-mpi.org/

May 2008
Mateti-Everything-About-Linux
39
Parallel Virtual Machine (PVM)
PVM enables a heterogeneous collection
of networked computers to be used as a
single large parallel computer.
 Older than MPI
 Large scientific/engineering user
community
 http://www.csm.ornl.gov/pvm/

May 2008
Mateti-Everything-About-Linux
40
Kernels Etc Mods for Clusters



Dynamic load balancing
Transparent process-migration
Kernel Mods




http://openssi.org/
http://ci-linux.sourceforge.net/




GlusterFS: Clustered File Storage of peta bytes.
GlusterHPC: High Performance Compute Clusters
http://boinc.berkeley.edu/


CLuster Membership Subsystem ("CLMS") and
Internode Communication Subsystem
http://www.gluster.org/


http://openmosix.sourceforge.net/
http://kerrighed.org/
Open-source software for volunteer computing and grid computing
Condor clusters
May 2008
Mateti-Everything-About-Linux
41
OS Share of Top 500
OS
Count
Linux
426
Windows 6
Unix
30
BSD
2
Mixed
34
MacOS
2
Totals 500
Share Rmax (GF) Rpeak (GF) Processor
85.20% 4897046
7956758
970790
1.20%
47495
86797
12112
6.00% 408378
519178
73532
0.40%
44783
50176
5696
6.80% 1540037
1900361
580693
0.40%
28430
44816
5272
100% 6966169
10558086
1648095
http://www.top500.org/stats/list/30/osfam Nov 2007
May 2008
Mateti-Everything-About-Linux
42
Security of Linux

Security flaws are largely due to




Number of exploits, number of advisories similar
to those of other OS




Network protocol design flaws
Sloppy programming by software authors
Poor configuration
Worms, not viruses
Compromised crypto
Buffer overflows
Considerable research analysis of Linux source
code
May 2008
Mateti-Everything-About-Linux
43
Security Hardened Linux
Portions of Linux replaced, re-designed,
enhanced for improved security
 Stack top randomization
 Prevention of data page execution
 Linux Security Modules (LSM)
 SELinux

May 2008
Mateti-Everything-About-Linux
44
Security Tools on Linux









Penetration Testing
Network analysis (e.g. nmap, tcpdump)
Password cracking
Disaster recovery (e.g. gparted, gpart, partimage,
testdisk, recover)
Virus scanning (Clam Antivirus, the GUI xfprot for F-Prot)
computer forensics (e.g. chkrootkit, foremost, rootkit
hunter)
Backtrack3 http://backtrack.offensive-security.com/
STD http://www.knoppix-std.org/
INSERT http://www.inside-security.de/insert_en.html
May 2008
Mateti-Everything-About-Linux
45
Important Applications
A Few Ubuntu/Debian packages

Electric


ViPEC


Electronic schematic and PCB design software
QCad 2


analysis of high frequency, linear electrical networks. ViPEC
supports lumped elements as well as distributed networks
Kicad


custom IC layout (ASICs), schematic drawing, hardware
description language specifications, and electro-mechanical
hybrid layout.
A professional CAD System with ISO-texts and DXF-files.
PythonCAD

May 2008
drafting program scriptable with Python
Mateti-Everything-About-Linux
47
Example Applications
Email: kmail, evolution, sylpheed,
thunderbird
 Surfing: konqueror, firefox, galeon, opera
 Software Development: compilers for
nearly all known languages
 Drawing: dia, graphviz, kchart, inkscape
 Music: amarok, gnupod
 Games: Sauerbraten, Savage, Doom

May 2008
Mateti-Everything-About-Linux
48
Applications on Publishing

TeX/LaTeX







Kyle
Lyx
TeXmacs
MetaPost drawing language
GraphViz
Scribus
Office Suites



May 2008
Abiword
Koffice
OpenOffice
Mateti-Everything-About-Linux
49
Matlab :: Scilab, Octave, Rlab
Not 100% compatible with m-files.
 Matrix-based programming languages.
 Built-in support for complex numbers.
 Powerful built-in math functions and
extensive function libraries.
 Extensibility in the form of user-defined
functions.

May 2008
Mateti-Everything-About-Linux
50
Computer Algebra Systems




Manipulation of symbolic and numerical
expressions, including differentiation, integration,
Taylor series, Laplace transforms, ordinary
differential equations, systems of linear
equations, polynomials, and sets, lists, vectors,
matrices, and tensors.
http://maxima.sourceforge.net/
http://mathomatic.orgserve.de/math/
Maple on Linux: commercial product
May 2008
Mateti-Everything-About-Linux
51
Software Development on Linux
Develop software for Linux on Linux
 Develop software for other OS on Linux
 Every well-known PL has compilers/
interpreters on Linux
 Excellent Debuggers
 Virtualization
 Team Support Environments

May 2008
Mateti-Everything-About-Linux
52
C and C++ on Linux
These are the “native” languages.
 Compilers

GNU compilers
 Intel compilers
 IBM compilers
 Sun Studio compilers
 Princeton LCC

May 2008
Mateti-Everything-About-Linux
53
GNU Compilers

Fortran
Fortran 95 standard
 a few Fortran 2003 features


Java
compilation to machine code
 as well as byte code

Objective-C, Objective-C++
 Ada and Pascal

May 2008
Mateti-Everything-About-Linux
54
Virtualization
Run multiple virtual machines on a single
host.
 VMware
 XEN
 QEMU/KVM
 VirtualLogix
 lguest
 OpenVZ

May 2008
Mateti-Everything-About-Linux
55
LiMo Foundation Platform




Open, hardwareindependent, Linuxbased OS for mobile
devices.
January 2007
Motorola, NEC, NTT
DoCoMo, Panasonic,
Samsung and Vodafone
www.limofoundation.org/
May 2008
Mateti-Everything-About-Linux
56
Specific Uses of Linux
Linux DIY Servers
Home MultiMedia/File Server
 LAMP Server

LAMP stands for Linux, Apache, MySQL, PHP
 WordPress
 Blog server


Email server

May 2008
spam assassin
Mateti-Everything-About-Linux
58
Linux Firewall

Take a standard PC and install one of
these:
IPcop http://www.ipcop.org/
 Smoothwall http://www.smoothwall.org/
 Firestarter http://www.fs-security.com/
 Kaladix http://www.kaladix.org/
 STD http://www.knoppix-std.org/
 EnGarde http://www.engardelinux.org/

May 2008
Mateti-Everything-About-Linux
59
Linux Digital Video Recorders

www.tivo.com/linux/


“In compliance with
the GPL version 2, we
are pleased to provide
our modifications to
the Linux Kernel, as
well as a few new
commands, and some
tools to get you into
the code.”
MythTV
May 2008
Mateti-Everything-About-Linux
60
Linux Installation Issues

Linux-only PCs


Newbies should be able to install
Multi-boot PCs Problem Areas
Partitioning of the hard disks
 Installation of OS Boot Loader


Mix and Match Distributions
Impractical to mix and match
 Best to Compile from Source Code

May 2008
Mateti-Everything-About-Linux
61
Linux Installation Issues

Device Drivers Unavailable for
Latest Graphics cards
 Latest Wireless cards
 Other devices are OK


Tainted/Restricted Drivers
Not “fully open source” drivers
 ndiswrapper

May 2008
Mateti-Everything-About-Linux
62
Linux Links
distrowatch.com/ – Distributions news
 kernel.org/ -- Kernel source code
 tldp.org/ -- Linux Documentation Project
 linux-live.org/ – LiveDVD build tools
 linuxsecurity.com/ - Linux security portal

May 2008
Mateti-Everything-About-Linux
63
Descargar

Document