Linux Essentials for Programmers & Administrators
1. Linux Ideas and History
Explain the nature of open source software
NOTE: ALL RIGHTS RESERVED !HOTO"O!#ING AN# !ART O$
THIS DO"%&ENT 'ITHO%T !RIOR "ON"ENT O$ S!R#
TE"H SOL%TIONS 'ILL (E TREATED AS VIOLATION O$ LA'
STRI"T A"TION 'O%LD (E TA)EN $OR AN# VIOLATION
!a*e +
ALT,-+,"h+ : Intro.uction to Linux i.eas an. histor/
The Histor/ of Linux starts with the earlier .e0elop1ent of
%NI2
%NI2
In +3435+36-7 )enneth Tho1pson7 Dennis Ritchie7 an.
others at AT8T (ell La9s 9e*an
.e0elopin* a s1all operatin* s/ste1 on a little5use. !D!56
The operatin* s/ste1 was soon
christene. %NI27 a pun on an earlier operatin* s/ste1
pro:ect calle. &%LTI"S In +36;5+36<
the s/ste1 was rewritten in the pro*ra11in* lan*ua*e "7 an
unusual step that was 0isionar/:
.ue to this .ecision7 %NI2 was the =rst wi.el/5use. operatin*
s/ste1 that coul. switch fro1
an. outli0e its ori*inal har.ware Other inno0ations were
a..e. to %NI2 as well7 in part .ue
to s/ner*ies 9etween (ell La9s an. the aca.e1ic
co11unit/ In +3637 the >>se0enth e.ition??
@V6A 0ersion of %NI2 was release.7 the *ran.father of all
extant %NI2 s/ste1s
After this point7 the histor/ of %NI2 9eco1es so1ewhat
con0olute. The aca.e1ic
co11unit/7 le. 9/ (erBele/7 .e0elope. a 0ariant calle.
the (erBele/ Software Distri9ution
@(SDA7 while AT8T continue. .e0elopin* %NI2 un.er the
na1es >>S/ste1 III?? an. later
>>S/ste1 V?? In the late +3C-?s throu*h earl/ +33-?s
the >>wars?? 9etween these two 1a:or
strains ra*e. After 1an/ /ears each 0ariant a.opte. 1an/
of the Be/ features of the other
"o11erciall/7 S/ste1 V won the >>stan.ar.s wars??
@*ettin* 1ost of its interfaces into the
for1al stan.ar.sA7 an. 1ost har.ware 0en.ors switche.
to AT8T?s S/ste1 V Howe0er7
S/ste1 V en.e. up incorporatin* 1an/ (SD inno0ations7 so
the resultin* s/ste1 was 1ore a
1er*er of the two 9ranches The (SD 9ranch .i. not .ie7 9ut
instea. 9eca1e wi.el/ use.
for research7 for !" har.ware7 an. for sin*le5purpose ser0ers
@e*7 1an/ we9 sites use a (SD
.eri0ati0eA
The result was 1an/ .iDerent 0ersions of %NI27 all
9ase. on the ori*inal se0enth
e.ition &ost 0ersions of %NI2 were proprietar/ an.
1aintaine. 9/ their respecti0e har.ware
0en.or7 for exa1ple7 Sun Solaris is a 0ariant of S/ste1 V
Three 0ersions of the (SD 9ranch of
%NI2 en.e. up as open source: $ree(SD @concentratin* on
ease5of5installation for !"5t/pe
har.wareA7 Net(SD @concentratin* on 1an/ .iDerent "!%
architecturesA7 an. a 0ariant of
Net(SD7 Open(SD @concentratin* on securit/A
$ree Software $oun.ation
In +3CE Richar. Stall1an?s $ree Software $oun.ation @$S$A
9e*an the GN% pro:ect7 a
pro:ect to create a free 0ersion of the %NI2 operatin*
s/ste1 (/ free7 Stall1an 1eant
software that coul. 9e freel/ use.7 rea.7 1o.i=e.7 an.
re.istri9ute. The $S$ successfull/
9uilt a 0ast nu19er of useful co1ponents7 inclu.in* a "
co1piler @*ccA7 an i1pressi0e text
e.itor @e1acsA7 an. a host of fun.a1ental tools Howe0er7 in
the +33-?s the $S$ was ha0in*
trou9le .e0elopin* the operatin* s/ste1 Bernel F$S$ +33CGH
without a Bernel their .rea1 of a
co1pletel/ free operatin* s/ste1 woul. not 9e realiIe.
Linux
In +33+ Linus Tor0al.s 9e*an .e0elopin* an operatin*
s/ste1 Bernel7 which he
na1e. >>Linux?? FTor0al.s +333G This Bernel coul. 9e
co19ine. with the $S$ 1aterial an.
other co1ponents @in particular so1e of the (SD
co1ponents an. &IT?s 25win.ows softwareA
to pro.uce a freel/51o.i=a9le an. 0er/ useful operatin*
s/ste1 This 9ooB will ter1 the tech solutions J T;G
A.0ance. Linux Trainin* ALT,-+: Linux K %NI2 Gettin*
Starte.
NOTE: ALL RIGHTS RESERVED !HOTO"O!#ING AN# !ART O$
THIS DO"%&ENT 'ITHO%T !RIOR "ON"ENT O$ S!R#
TE"H SOL%TIONS 'ILL (E TREATED AS VIOLATION O$ LA'
STRI"T A"TION 'O%LD (E TA)EN $OR AN# VIOLATION
!a*e ;
Bernel itself the >>Linux Bernel?? an. an entire co19ination as
>>Linux?? Note that 1an/ use the
ter1 >>GN%KLinux?? instea. for this co19ination
In the Linux co11unit/7 .iDerent or*aniIations ha0e
co19ine. the a0aila9le
co1ponents .iDerentl/ Each co19ination is calle. a
>>.istri9ution??7 an. the or*aniIations
that .e0elop .istri9utions are calle. >>.istri9utors??
"o11on .istri9utions inclu.e Re. Hat7
&an.raBe7 SuSE7 "al.era7 "orel7 an. De9ian There are
.iDerences 9etween the 0arious
.istri9utions7 9ut all .istri9utions are 9ase. on the sa1e
foun.ation: the Linux Bernel an. the
GN% *li9c li9raries Since 9oth are co0ere. 9/
>>cop/left?? st/le licenses7 chan*es to these
foun.ations *enerall/ 1ust 9e 1a.e a0aila9le to all7 a
unif/in* force 9etween the Linux
.istri9utions at their foun.ation that .oes not exist 9etween
the (SD an. AT8T5.eri0e. %nix
s/ste1s This 9ooB is not speci=c to an/ Linux .istri9utionH
when it .iscusses Linux it presu1es
Linux Bernel 0ersion ;; or *reater an. the " li9rar/ *li9c ;+
or *reater7 0ali. assu1ptions for
essentiall/ all current 1a:or Linux .istri9utions
Open Source K $ree Software
Increase. interest in software that is freel/ share. has 1a.e
it increasin*l/ necessar/
to .e=ne an. explain it A wi.el/ use. ter1 is >>open
source software??7 which is further
.e=ne. in FOSI +333G Eric Ra/1on. F+3367 +33CG wrote
se0eral se1inal articles exa1inin* its
0arious .e0elop1ent processes Another wi.el/5use.
ter1 is >>free software??7 where the
>>free?? is short for >>free.o1??: the usual explanation is
>>free speech7 not free 9eer?? Neither
phrase is perfect The ter1 >>free software?? is often
confuse. with pro*ra1s whose
executa9les are *i0en awa/ at no char*e7 9ut whose
source co.e cannot 9e 0iewe.7
1o.i=e.7 or re.istri9ute. "on0ersel/7 the ter1 >>open
source?? is so1eti1e @a9A use. to
1ean software whose source co.e is 0isi9le7 9ut for
which there are li1itations on use7
1o.i=cation7 or re.istri9ution This 9ooB uses the ter1
>>open source?? for its usual 1eanin*7
that is7 software which has its source co.e freel/ a0aila9le
for use7 0iewin*7 1o.i=cation7 an.
re.istri9utionH a 1ore .etaile. .e=nition is containe. in the
Open Source De=nition In so1e
cases7 a .iDerence in 1oti0e is su**este.H those preferrin*
the ter1 >>free software?? wish to
stron*l/ e1phasiIe the nee. for free.o17 while those usin*
the ter1 1a/ ha0e other 1oti0es
@e*7 hi*her relia9ilit/A or si1pl/ wish to appear less
stri.ent $or infor1ation on this .e=nition
of free software7 an. the 1oti0ations 9ehin. it7 can 9e foun.
athttp:KKwwwfsfor*
Those intereste. in rea.in* a.0ocac/ pieces for open
source software an. free
software shoul. see http:KKwwwopensourceor* an.
http:KKwwwfsfor* There are other
.ocu1ents which exa1ine such software7 for exa1ple7
&iller F+33LG foun. that the open
source software were noticea9l/ 1ore relia9le than
proprietar/ software @usin* their
1easure1ent techniMue7 which 1easure. resistance to
crashin* .ue to ran.o1 inputA
"o1parin* Linux an. %NI2
&ostl/ we will use the ter1 >>%nix5liBe?? to .escri9e
s/ste1s intentionall/ liBe %NI2 In
particular7 the ter1 >>%nix5liBe?? inclu.es all 1a:or %NI2
0ariants an. Linux .istri9utions Note
that 1an/ people si1pl/ use the ter1 >>%NI2?? to .escri9e
these s/ste1s instea. Ori*inall/7
the ter1 >>%nix?? 1eant a particular pro.uct .e0elope.
9/ AT8T To.a/7 the Open Group
owns the %NI2 tra.e1arB7 an. it .e=nes %NI2 as >>the
worl.wi.e Sin*le %NI2 Speci=cation??
Linux is not .eri0e. fro1 %NI2 source co.e7 9ut its
interfaces are intentionall/ liBe
%NI2 Therefore7 %NI2 lessons learne. *enerall/ appl/ to
9oth7 inclu.in* infor1ation on
securit/ &ost of the infor1ation in this 9ooB applies to
an/ %nix5liBe s/ste1 Linux5speci=c tech solutions J T;G
A.0ance. Linux Trainin* ALT,-+: Linux K %NI2 Gettin*
Starte.
NOTE: ALL RIGHTS RESERVED !HOTO"O!#ING AN# !ART O$
THIS DO"%&ENT 'ITHO%T !RIOR "ON"ENT O$ S!R#
TE"H SOL%TIONS 'ILL (E TREATED AS VIOLATION O$ LA'
STRI"T A"TION 'O%LD (E TA)EN $OR AN# VIOLATION
!a*e <
infor1ation has 9een intentionall/ a..e. to ena9le those
usin* Linux to taBe a.0anta*e of
Linux?s capa9ilities
%nix5liBe s/ste1s share a nu19er of securit/
1echanis1s7 thou*h there are su9tle
.iDerences an. not all s/ste1s ha0e all 1echanis1s
a0aila9le All inclu.e user an. *roup i.s
@ui.s an. *i.sA for each process an. a =les/ste1 with rea.7
write7 an. execute per1issions
@for user7 *roup7 an. otherA See Tho1pson F+36EG an. (ach
F+3C4G for *eneral infor1ation on
%NI2 s/ste1s7 inclu.in* their 9asic securit/ 1echanis1s
Linux K%NI2 Histor/ Ti1e Line
#ear E0ent
+3L6
(ell La9s foun. the/ nee.e. an operatin* s/ste1 for their
co1puter center which
at that ti1e was runnin* 0arious 9atch :o9s The (ES#S
operatin* s/ste1 was
create. at (ell La9s to .eal with these nee.s
+34L
(ell La9s was a.optin* thir. *eneration co1puter eMuip1ent
an. .eci.e. to :oin
forces with General Electric an. &IT to create &ultics
@&ultiplexe. Infor1ation an.
"o1putin* Ser0iceA
+343
(/ April +3437 AT8T 1a.e a .ecision to with.raw &ultics an.
*o with GE"OS 'hen
&ultics was with.rawn )en Tho1pson an. Dennis
Ritchie nee.e. to rewrite an
operatin* s/ste1 in or.er to pla/ space tra0el on another
s1aller 1achine @a DE"
!D!56 F!ro*ra11e. Data !rocessor E) 1e1or/ for user
pro*ra1sA The result was a
s/ste1 which a punnin* collea*ue calle. %NI"S
@%Niplexe. Infor1ation an.
"o1putin* Ser0iceA55an ?e1asculate. &ultics?
+343 Su11er +343 %nix was .e0elope.
+343 Linus Tor0al.s is 9orn
+36+
$irst e.ition of %nix release. ++K-<K+36+ The =rst e.ition
of the N%nix
!ROGRA&&ER?S &AN%AL F9/G ) Tho1pson Fan.G D &
RitchieN It inclu.es o0er 4-
co11an.s liBe: 9 @co1pile ( pro*ra1AH 9oot @re9oot
s/ste1AH cat @concatenate
=lesAH ch.ir @chan*e worBin* .irector/AH ch1o. @chan*e
access
1o.eAH chown@chan*e ownerAH cp @cop/ =leAH ls @list .irector/
contentsAH 10 @1o0e
or rena1e =leAH roD @run oD textAH wc@*et wor. countAH who
@who is one the s/ste1A
The 1ain thin* 1issin* was pipes
+36; Secon. e.ition of %nix release. +;K-4K+36;
+36; Ritchie rewrote ( an. calle. the new lan*ua*e "
+36<
%nix ha. 9een installe. on +4 sites @all within
AT8TK'estern ElectricAH it was
pu9licall/ un0eile. at a conference in Octo9er
+36< Thir. e.ition of %nix release. $e9ruar/ +36<
+36< $orth e.ition of %nix release. No0e19er +36<
+36E $ifth e.ition of %nix release. Oune +36E
+36E
Tho1pson went to %" (erBele/ to teach for a /earH (ill
Oo/ arri0e. as a new
*ra.uate stu.ent $rustrate. with e.7 Oo/ .e0elope. a 1ore
feature. e.itor e1
+36L Sixth e.ition of %nix release. &a/ +36L
+36L (ourne shell is intro.uce. 9e*ins 9ein* a..e. onto
+366 +(SD release. late +366
+36C ;(SD release. 1i. +36C tech solutions J T;G
A.0ance. Linux Trainin* ALT,-+: Linux K %NI2 Gettin*
Starte.
NOTE: ALL RIGHTS RESERVED !HOTO"O!#ING AN# !ART O$
THIS DO"%&ENT 'ITHO%T !RIOR "ON"ENT O$ S!R#
TE"H SOL%TIONS 'ILL (E TREATED AS VIOLATION O$ LA'
STRI"T A"TION 'O%LD (E TA)EN $OR AN# VIOLATION
!a*e E
+363 Se0enth e.ition of %nix release. Oanuar/ +363
+363 <(SD release. late +363
+363 S"O foun.e. 9/ Dou* an. Larr/ &ichels as %nix
portin* an. consultin* co1pan/
+3C- E-(SD release. Octo9er +3C-
+3C; SGI intro.uces IRI2
+3C<
S"O .eli0ers its =rst pacBa*e. %nix s/ste1 calle. S"O
2ENI2 S/ste1 V for Intel C-C4
an. C-CC processor59ase. !"s
+3CE %ltrix +- was release.
+3CL Ei*hth e.ition of %nix release. $e9ruar/ +3CL
+3CL
The GN% 1anifesto is pu9lishe. in the &arch +3CL issue of
Dr Do99?s Oournal The
GN% pro:ect starts a /ear an. a half later
+3C4 H!5%2 +- release.
+3C4 Ninth e.ition of %nix release. Septe19er +3C4
+3C6
Sun an. AT8T la/ the *roun.worB for 9usiness co1putin* in
the next .eca.e with
an alliance to .e0elop %nix S/ste1 V Release E
+3CC H!5%2 ;- release.
+3CC H!5%2 <- release.
+3C3
S"O ships S"O %nix S/ste1 VK<C47 the =rst 0olu1e
co11ercial pro.uct license. 9/
AT8T to use the %nix S/ste1 tra.e1arB
+3C3 H!5%2 6- release.
+3C3 Tenth e.ition of %nix release. Octo9er +3C3
+33-
AI2 short for A.0ance. Interacti0e e2ecuti0e was =rst
entere. into the 1arBet
9/ I(& $e9ruar/ +33-
+33+
Sun un0eils Solaris ; operatin* en0iron1ent7 speciall/
tune. for s/1etric
1ultiprocessin*
+33+
Linux is intro.uce. 9/ Linus Tor0al.s7 a stu.ent in
$inlan. 'ho post to the
co1pos1inix news*roup with the wor.s:
PHello e0er/9o./ out there usin* 1inix 5 I?1 .oin* a @freeA
operatin* s/ste1 @:ust a
ho99/7 won?t 9e 9i* an. professional liBe *nuA for <C4@EC4A
AT clonesQ
+33+ H!5%2 C- release.
+33+ (SDK<C4 AL!HA $irst co.e release. to people outsi.e
(SDI +;KxxK+33+
+33; H!5%2 3- release.
+33< Net(SD -C release. -EK;-K+33<
+33< $ree(SD +- release. Dece19er of +33<
+33E Re. Hat Linux is intro.uce.
+33E "al.era7 Inc was foun.e. in +33E 9/ Ranso1 Lo0e an.
(r/an SparBs
+33E Net(SD +- release. +-K;4K+33E
+33L $ree(SD ;- release. -+KxxK+33L
+33L
S"O acMuires %nix S/ste1s source technolo*/ 9usiness
fro1 No0ell "orporation
@which ha. acMuire. it fro1 AT8T?s %nix S/ste1
La9oratoriesA S"O also acMuires
%nix'are ; operatin* s/ste1 fro1 No0ell
+33L H!5%2 +-- release. tech solutions J T;G
A.0ance. Linux Trainin* ALT,-+: Linux K %NI2 Gettin*
Starte.
NOTE: ALL RIGHTS RESERVED !HOTO"O!#ING AN# !ART O$
THIS DO"%&ENT 'ITHO%T !RIOR "ON"ENT O$ S!R#
TE"H SOL%TIONS 'ILL (E TREATED AS VIOLATION O$ LA'
STRI"T A"TION 'O%LD (E TA)EN $OR AN# VIOLATION
!a*e L
+33L EE (SD Lite Release ; the true =nal .istri9ution fro1
the "SRG -4KxxK+33L
+334 )DE is starte. to 9e .e0elope. 9/ &atthias Ettrich
+336 H!5%2 ++- release.
+336
"al.era ships OpenLinux Stan.ar. ++ &a/ L7 +3367 the
secon. oDerin* in
"al.era?s OpenLinux pro.uct line
+33C IRI2 4L the =fth *eneration of SGI %nix is release. Oul/
47 +33C
+33C S"O .eli0ers %nix'are 6 operatin* s/ste1
+33C Sun Solaris 6 operatin* s/ste1 release.
+33C $ree(SD <- release. +-K+4K+33C
;--- $ree(SD E- release. -<K+<K;---
;---
"al.era S/ste1s Inc announces that "al.era S/ste1s has
entere. into a*ree1ent
to acMuire the S"O Ser0er Software Di0ision an. the
!rofessional Ser0ices Di0ision
;--+ Linus Tor0al.s releases 0ersion ;E of the Linux )ernel
source co.e on Oanuar/ Eth
;--+ &icrosoft =les a tra.e1arB suit a*ainst Lin.owsco1 in
Dece19er
;--E Lin.ows chan*es its na1e to Linspire April +E7 ;--E
Basic Principles in Linux!
1. Everything is a file :
In Linux everything is considered as a file. Unlike indos! all devices like cd"ro#! $a#!
key%oard !&onotor etc are considered as specific files. 'nd these devices ork accourding to its file
configuration.
(. )onfiguration data of the syste# is stored in text usually na#ed ith extension! .conf :
'll the configuration files of the syste# are saved as text file having an extension .conf. *e need to
edit these files using text editors like +I! +I&! PI),! -'-, etc to change the syste# configuration.
'nd syste# updation is done %y #odifying these conf files. &ost of the syste# conf files ill %e
located under the location .etc.
/. )onnection pipes for standard I., to chain progra#s :
0he pipe operation connects the standard ,.P of one progra# to the standard I.P of an another. 'nd
such a chain of progra#s connected is called a pipeline.