matetiLinux2008 - College of Engineering and Computer Science

solidseniorΔιακομιστές

9 Δεκ 2013 (πριν από 3 χρόνια και 10 μήνες)

91 εμφανίσεις

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

May 2008

Mateti
-
Everything
-
About
-
Linux

4

Linux runs on …


PDA? Smart Phone?


GPS?


TiVO?


Router? Wireless AP?


Wrist watch?


Car? Airplane?

May 2008

Mateti
-
Everything
-
About
-
Linux

5

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

6

Linux Cell Phones


http://openmoko.org


Open source
hardware


Free CAD files

May 2008

Mateti
-
Everything
-
About
-
Linux

7

Linux on iPods


uCLinux + podzilla


www.ipodlinux.org/


iPOds to 5.5G


iPod Nano 1G

May 2008

Mateti
-
Everything
-
About
-
Linux

8

One Laptop Per Child


Runs on Linux


Sugar “desktop”
promotes sharing and
learning.

May 2008

Mateti
-
Everything
-
About
-
Linux

9

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

10

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

11

Overview of the Rest of theTalk

1.
Linux Internals

2.
Distributions

3.
Desktop Environments

4.
Linux Clusters

5.
Security

6.
Open Source Software

7.
Important Applications

Linux Internals

May 2008

Mateti
-
Everything
-
About
-
Linux

13

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

14

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

15

“Linux kernel”


The OS as we defined


boot


SysPrgs


Monolithic


As Files


/boot/vmlinuz

single file


/boot/initrd


single file


/lib/modules/*

about 3500 files


4 Million lines of code


Several thousand contributors

May 2008

Mateti
-
Everything
-
About
-
Linux

16

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

17

“Linux” as used in this Talk


Linux Kernel


System Programs: /sbin, /usr/sbin


UI


Desktop Env: X11, KDE, Gnome, …


Shells: Bash, csh, ksh, …


Utilities


/bin, /usr/bin, …


Applications


Publishing: TeX, MetaPost, PS, PDF, …


Multimedia: Audio, Video


Sotware Development: Perl, Python, Ruby,


Servers


Web


File


Compute

May 2008

Mateti
-
Everything
-
About
-
Linux

18

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

19

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

20

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

21

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

22

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


Linux Distributions

May 2008

Mateti
-
Everything
-
About
-
Linux

24

Linux Distributions


Define “distribution”!


Major Distributions


Debian, Ubuntu


RedHat, Fedora


Novell SuSe, Open Suse


Mandriva


Slackware


Minor Distributions


1000+

May 2008

Mateti
-
Everything
-
About
-
Linux

25

How Do Distributions Differ?


What is included in the default installation


Operating System


UI


Shells


GUI


Utilities


Selected Applicatins


Patches provided by the Distro


Installing New Components/Applications


Updates


Security


New versions


Browsing for Available Software


Look and Feel of the Initial Install

May 2008

Mateti
-
Everything
-
About
-
Linux

26

How Do Distributions Differ?


Versions of installed libraries


/lib/


/usr/lib/


Configuration


Location of Files


Syntax


GUI/command line tools


Distributions from Scratch


Build it from Source


Gentoo


May 2008

Mateti
-
Everything
-
About
-
Linux

27

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

28

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

29

Knoppix LiveDVD


General Purpose Linux


Try it without installing on HDD


Excellent hardware detection


Large collection of applications


KDE, …, fluxbox


Open Office, Emacs, gcc, …


Web browsers, …


Uncompresses on the fly


Several GB of software


Relatively Slow

May 2008

Mateti
-
Everything
-
About
-
Linux

30

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

31

Linux on a USB Drive


Install on a USB MSD as a HDD


Install a Live Image on USB MSD


On the fly uncompression


Fast installation


Relatively slow execution


Lab on Installing Linux on a USB Drive


http://www.cs.wright.edu/~pmateti/Courses/233
-
2008
-
Spring/Labs/OS
-
on
-
USB/OSonUSBLab.htm


http://pendrivelinux.com/


May 2008

Mateti
-
Everything
-
About
-
Linux

32

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

33

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

Linux Clusters

May 2008

Mateti
-
Everything
-
About
-
Linux

35

Cluster
Characteristics


Commodity of
f

the shelf hardware


N
etwork
ed


Common Home Directories


Open source software and OS


Support
message passing

programming


Batch scheduling of jobs


Process migration

May 2008

Mateti
-
Everything
-
About
-
Linux

36

Why
are Linux Clusters

G
ood?


Low initial implementation cost


Inexpensive
PCs


Standard components

and Networks


Free Software
:

L
inux,

GNU, MPI, PVM


Scalability: c
an
grow and shrink


Familiar
t
echnology, easy for user to
adopt the approach, use and maintain
system.

May 2008

Mateti
-
Everything
-
About
-
Linux

37

Example Clusters


July 1999


1
000
nodes


Used for genetic
algorithm research by
John
K
oza, Stanford
University


www.genetic
-
programming.com/


May 2008

Mateti
-
Everything
-
About
-
Linux

38

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

39

Message Passing Interface (MPI)


http://www
-
unix.mcs.anl.gov/mpi/


MPI
-
2.0
http://www.mpi
-
forum.org/docs/



MPI
CH:
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

40

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

41

Kernels Etc Mods for Clusters


Dynamic load balancing


Transparent process
-
migration


Kernel Mods


http://openmosix.sourceforge.net/



http://kerrighed.org/


http://openssi.org/


http://ci
-
linux.sourceforge.net/


CLuster Membership Subsystem ("CLMS") and


Internode Communication Subsystem


http://www.gluster.org/



GlusterFS: Clustered File Storage of peta bytes.


GlusterHPC: High Performance Compute Clusters


http://boinc.berkeley.edu/


Open
-
source software for volunteer computing and grid computing


Condor clusters


May 2008

Mateti
-
Everything
-
About
-
Linux

42

OS Share of Top 500


OS Count


Share


Rmax (GF)

Rpeak (GF) Processor

Linux


426

85.20% 4897046

7956758

970790

Windows 6


1.20% 47495


86797


12112

Unix


30


6.00% 408378


519178


73532

BSD


2


0.40% 44783


50176


5696

Mixed 34


6.80% 1540037

1900361

580693

MacOS 2


0.40% 28430


44816


5272

Totals


500


100% 6966169 10558086 1648095


http://www.top500.org/stats/list/30/osfam

Nov 2007

May 2008

Mateti
-
Everything
-
About
-
Linux

43

Security of Linux


Security flaws are largely due to


Network protocol design flaws


Sloppy programming by software authors


Poor configuration


Number of exploits, number of advisories similar
to those of other OS


Worms, not viruses


Compromised crypto


Buffer overflows


Considerable research analysis of Linux source
code


May 2008

Mateti
-
Everything
-
About
-
Linux

44

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

45

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


Important Applications

May 2008

Mateti
-
Everything
-
About
-
Linux

47

A Few Ubuntu/Debian packages


Electric


custom IC layout (ASICs), schematic drawing, hardware
description language specifications, and electro
-
mechanical
hybrid layout.


ViPEC


analysis of high frequency, linear electrical networks. ViPEC
supports lumped elements as well as distributed networks


Kicad


Electronic schematic and PCB design software


QCad 2


A professional CAD System with ISO
-
texts and DXF
-
files.


PythonCAD


drafting program scriptable with Python

May 2008

Mateti
-
Everything
-
About
-
Linux

48

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

49

Applications on Publishing


TeX/LaTeX


Kyle


Lyx


TeXmacs


MetaPost drawing language


GraphViz


Scribus


Office Suites


Abiword


Koffice


OpenOffice


May 2008

Mateti
-
Everything
-
About
-
Linux

50

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

51

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

52

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

53

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

54

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

55

Virtualization


Run multiple virtual machines on a single
host.


VMware


XEN


QEMU/KVM


VirtualLogix


lguest


OpenVZ

May 2008

Mateti
-
Everything
-
About
-
Linux

56

LiMo Foundation Platform


Open, hardware
-
independent, Linux
-
based OS for mobile
devices.


January 2007


Motorola, NEC, NTT
DoCoMo, Panasonic,
Samsung and Vodafone


www.limofoundation.org/


Specific Uses of Linux

May 2008

Mateti
-
Everything
-
About
-
Linux

58


Linux DIY Servers


Home MultiMedia/File Server


LAMP Server


LAMP stands for Linux, Apache, MySQL, PHP


WordPress


Blog server


Email server


spam assassin

May 2008

Mateti
-
Everything
-
About
-
Linux

59

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

60


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

61


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

62


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

63

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