You are on page 1of 26

8CA DLGkLL LkAMINA1ICN AkIL 2011

Answer key Lo Llnux CS Anu 8CC8AMMlnC



A81 A (3 Marks CuesLlon)

1 Jf |s bfs|c Arc|cr of L|n CS?
Ans Llnux ls open source free sofLware whlch ls based on unlx lL ls a dlfflculL and
compllcaLed CS 1he baslc archlLecLure of Llnux ls based on kernel 1he flrsL Llnux kernel was
developed ln 1991Llnux ls based on monollLhlc kernel lL ls able Lo perform monollLhlc mulLlLasklng
ln user as well as kernel mode lL ls also able Lo supporL vlsual memory lL also provldes Lhe faclllLy of
shared llbrarles lL ls also able Lo do beLLer memory managemenL and Lhreadlng

1here are flve baslc subsysLems of kernel whlch are process scheduler memory manager vlrLual
flle sysLem neLwork lnLerface and lnLer process communlcaLlon 1he process scheduler allows and
conLrols Lhe process access Lo Lhe cenLral processlng unlL Memory manager ls Lhere Lo gulde Lhe
mulLl processes Lo make use of maln memory ln a secure manner vlrLual flle sysLem ls responslble
ln maklng an abrldgemenL of Lhe deLalls of Lhe varlous hardware devlces by ln order Lo presenL Lhe
common flle lnLerface Lo posslbly every devlce neLwork lnLerface ls Lhe one responslble for
provldlng access Lo neLworklng proLocols and hardware lnLer process communlcaLlon ls complex
Lask

1he flle sysLem of Llnux ls based on slngle rooL dlrecLory or sub dlrecLorles Sub dlrecLorles are
usually used as mounL polnLs where lL ls posslble Lo comblne varlous neLwork flles 1he hardware
commands are also lncorporaLed lnLo Lhe flle hlerarchy uevlce drlver lnLerface Lo Lhe end user ls
also a parL of Lhls devlce drlver

2 Jf |s boo b|ock?
Ans 8ooL block ls Lhe block ln Lhe Llnux CS whlch conLalns Lhe lnsLrucLlons needed Lo sLarL
an CS 1he process of Lurnlng on usr compuLer and havlng lL [umps Lhrough hoops Lo brlng up Lhe
CperaLlng SysLem ls called booLlng 1he very flrsL sLep ln booLlng ls CS1 (owerCnSelf1esL)
operaLlon whlch flrsL deLecLs all Lhe hard wares connecLed Lo Lhe compuLer and loads Lhe requlred
approprlaLe drlvers for Lhe hard wares connecLed 1he booLlng process ln Llnux ls almosL slmllar Lo
Lhe booLlng process ln oLher CperaLlng SysLems

Cnce Lhe CS1 ls compleLed Lhe hardware [umps Lo a speclflc predeflned locaLlon ln 8AM 1he
lnsLrucLlons locaLed here are relaLlvely slmple and baslcally Lell Lhe hardware Lo go look for a booL
devlce uependlng on how usr CMCS ls conflgured Lhe hardware flrsL checks usr floppy and Lhen usr
hard dlsk








Jf fr |nods?
Ans An lnode (lndex node) ls a daLa sLrucLure on a LradlLlonal unlxsLyle flle sysLem such as
ulS or exL3 An lnode sLores baslc lnformaLlon abouL a regular flle dlrecLory or oLher flle sysLem
ob[ecL 1he lnode ls a fundamenLal concepL ln Lhe Llnux flle sysLem Lach ob[ecL ln Lhe flle sysLem ls
represenLed by an lnode Lach and every flle under Llnux (and unlx) has followlng aLLrlbuLes
a ermlsslons (read wrlLe eLc)
b Cwner
c Croup
d llle Slze
e llle access change and modlflcaLlon Llme
f llle Lype (execuLable block speclal eLc)
g llle deleLlon Llme
h number of llnks (sofL/hard)

All Lhe above lnformaLlon sLored ln an lnode ln shorL Lhe lnode ldenLlfles Lhe flle and lLs aLLrlbuLes
Lach lnode ls ldenLlfled by a unlque lnode number wlLhln Lhe flle sysLem lnode ls also known as
lndex number

SynLax
$ ls l eLc/passwd
C/p
32820 /eLc /passwd

Jf |s k||| commfnd?
Ans 1he klll command ls used Lo klll a process by uslng Lhe assoclaLed lu(rocess lu)
number 1he klll command ls very easy lnadverLenLly Lo klll any vlLal process

lor example klll 381
1hls wlll klll Lhe process wlLh Lhe lu 381

S Jf |s f p|p |n L|n?
Ans lpes allows sendlng Lhe ouLpuL of one command Lo Lhe lnpuL of anoLher command
1hls ls done by uslng redlrecLlon
$ rpm qa rpmllsL
$ sorL rpmllsL

1he sLandard ouLpuL redlrecLlon redlrecLs Lhe ouLpuL from Lhe rpm command Lo a flle
called repllsL now rpmllsL flle conLaln Lhe llsL of all lnsLalled packages on Lhe sysLem
lnpuL redlrecLlon sends Lhe conLenLs of Lhe rpmllsL flle Lo Lhe sorL command Lo
sorL Lhe package names alphabeLlcally lnsLead of redlrecLlng Lhe ouLpuL of a command Lo a flle lL
allows Lo redlrecL Lhe ouLpuL Lo anoLher command 1he process ls called plplng 1he plpe symbol ls
Lhe bar operaLor (|)
Command1|command2

1he Llnux sysLem runs boLh commands aL Lhe same Llme llnklng Lhem LogeLher lnLernally ln Lhe
sysLem As Lhe 1
sL
command produces ouLpuL lL ls send lmmedlaLely Lo Lhe 2
nd
command no
lnLermedlaLe flles or buffer areas are use Lo Lransfer Lhe daLa lplng command easlly plpe Lhe
ouLpuL of Lhe rpm command dlrecLly Lo Lhe sorL command Lo produce resulL
$ rpm qa|sorL

1he plplng feaLure operaLes as soon as Lhe rpm command produces daLa Lhe sorL command geLs
busy sorLlng lL 8y Lhe Llme Lhe rpm command flnlshes ouLpuLLlng daLa Lhe sorL command already
has Lhe daLa sorLed sLarLs dlsplaylng lL on Lhe monlLor lL uses redlrecLlon along wlLh plplng Lo save
ouLpuL Lo a flle

$ rpm qa|sorL rpmllsL


6 Jf fr ffrs of Io d|or?
Ans 1he feaLures of !oe edlLor are as follows
a) MulLl flle search and replace flle llsL ls elLher glven on command llne or by a unlx
command (grep/flnd) run from wlLhln !oe
b) Mouse supporL lncludlng wheel 1he mouse can reslze wlndows scroll wlndows selecL and
pasLe LexL and selecL menu enLrles
c) SynLax hlghllghLlng for more Lhan 40 languages
d) nondesLrucLlve edlLlng of blnary flles even when handllng MSuCS or unlx llne endlngs
e) Swap flles allows edlLlng flles larger Lhan memory
f) lcLure mode for ASCll graphlcs
g) Llne number mode dlsplays llne number of each llne
h) Can accepL daLa from a plpe for example ls|[oe


7 Jf |s ro| of Sysm Adm|n|srfor?
Ans 1he roles of SysLem AdmlnlsLraLor are as follows
a) 1he prlme role ls user admlnlsLraLlon (seL up and malnLaln user accounLs)
b) 1o malnLaln smooLh runnlng of Lhe sysLem
c) 1o check LhaL Lhe perlpherals are worklng properly
d) 1o monlLor sysLem performance Lo Lhe uLmosL
e) 1o creaLe flle sysLem as per Lhe organlzaLlonal requlremenLs
f) 1o lnsLall sofLware as per Lhe organlzaLlonal requlremenLs
g) 1o manage neLwork communlcaLlon for beLLer coordlnaLlon among users
h) 1o lmplemenL securlLy pollcles for use of Lhe compuLer sysLem and neLwork


8 Jo |s f spr sr |n L|n?
Ans ln llnux rooL ls Lhe convenLlonal name of Lhe user who has all Lhe rlghLs and
permlsslon (Lo all flles and programs) ln all modes(slngle or mulLluser) 1he rooL user ls also known
as Super user 1he rooL user can do many Lhlngs an ordlnary user cannoL such as changlng Lhe
ownershlp of flles and blndlng Lo porLs numbered below 1024Lhe rooL ls Lhe only user accounL wlLh
permlsslon Lo modlfy Lhe rooL dlrecLory of a Llnux sysLem



Jf |s f s||?
Ans Shell ls a speclal lnLeracLlve uLlllLy lL provldes a way for users Lo sLarL programs manage
flles on Lhe flle sysLem and manage processes runnlng on Lhe Llnux sysLem 1he core of Lhe shell ls
Lhe command prompL 1he command prompL ls Lhe lnLeracLlve parL of Lhe shell lL allows Lhe user Lo
enLer LexL commands lnLerpreLs Lhe commands Lhen execuLes Lhe commands ln Lhe kernel

1he shell conLalns a seL of lnLernal commands used Lo conLrol Lhlngs such as copylng flles movlng
flles renamlng and dlsplaylng Lhe programs currenLly runnlng on Lhe sysLem 8esldes Lhe lnLernal
commands user can enLer Lhe name of program aL command prompL 1he shell passes Lhe program
name off Lhe kernel Lo sLarL lL 1he defaulL shell used ln Llnux dlsLrlbuLlon ls Lhe 8ash shell

1he dlfferenL Lypes of shells are as follows

Ash shell A slmple llghL welghL shell LhaL runs ln low memory envlronmenLs buL has full
compaLlblllLy wlLh Lhe bash shell

korn shell A programmlng shell compaLlble wlLh 8ourne shell buL supporLlng advanced
programmlng feaLure llke assoclaLlve arrays and floaLlng polnL arlLhmeLlc

1csh shell A shell LhaL lncorporaLes elemenLs from Lhe C programmlng language lnLo Lhe shell
scrlpLs

Zsh shell An advanced shell LhaL lncorporaLes feaLures from bash Lcsh and korn provldlng
advanced feaLures shared memory eLc


10Jf |s f 'Sd' f||r?
Ans 1he Sed command modlfles llne from Lhe speclfled flle parameLer accordlng Lo an edlL
scrlpL and wrlLes Lhem Lo a sLandard ouLpuL 1he Sed command lncludes many feaLures for selecLlng
llnes Lo be modlfled and maklng changes Lo only selecLed llnes

1he Sed command uses Lwo work spaces for holdlng Lhe llne belng modlfled Lhe paLLern space
where Lhe selecLed llne ls held and Lhe hold space where a llne can be sLored Lemporarlly
An edlL scrlpL conslsLs of lndlvldual subcommands each one on a separaLe llne 1he general form of
Sed subcommands ls Lhe followlng
oJJtesstooqe fooctloomoJlflets
When a command lncludes an address (elLher a llne number or a search paLLern) only Lhe
addressed llne or llnes are affecLed by Lhe command CLherwlse Lhe command ls applled Lo all
llnes
An address ls elLher a declmal llne number a $ (dollar slgn) whlch addresses Lhe lasL llne of lnpuL
or a conLexL address


11Jf |s k w|ndows?
Ans 1he x wlndows sysLem ls a large and powerful somewhaL complex graphlcs
envlronmenL for unlx sysLems 1he x wlndows sysLem code was developed orlglnally aL Ml1
Commerclal vendors have slnce made x Lhe lndusLry sLandard for unlx plaLforms vlrLually every
unlx worksLaLlon runs one or Lhe oLher varlanL of Lhe x wlndows sysLem

ln x wlndows x sLands for Lhe sLandard graphlcal user lnLerface for Llnux !usL llke any oLher user
lnLerfaces such as MlcrosofL wlndows and Mac CS x leLs us lnLeracL wlLh programs wlLh Lhe help of
a polnLlng devlce such as a mouse Lo polnL and cllck provldlng an easy means of communlcaLlng
wlLh our compuLer

12Jf |s f s|| kyword? G|v fmp| of s|| kywords?
Ans Shell keywords are Lhe baslc commands and codes used ln llnux for shell scrlpLlng and
programmlng Some of Lhe shell keywords are as follows

8un Lhe prevlous command ln Lhe background
Lg ls

Loglcal Anu
Lg lf$foo" ge 0"$foo" le 9"

|| Loglcal C8
Lg lf$foo" lL 0"||$foo" gL 9"

$$ lu of currenL shell
Lg echo my lu $$"

$! lu of lasL background command
Lg ls echo ls reLurned code $?"

$0 name of currenL command
Lg echo l am $0"

$1 name of currenL command's flrsL parameLer
Lg echo M? flrsL argumenL ls $1"

eq numerlc equallLy
Lg lf$foo" eq 9"

ne numerlc lnequallLy
Lg lf$foo" ne 9"

lL Less Lhan
Lg lf$foo" lL 9"


le Less Lhan or equal
Lg lf$foo" le 9"

gL CreaLer Lhan
Lg lf$foo" gL 9"

ge CreaLer Lhan or equal
Lg lf$foo" ge 9"

r ls readable flle
Lg lfr/bln/ls

w ls wrlLable flle
Lg lfw/bln/ls

x ls an execuLable flle
Lg lfx/bln/ls






























A81 8 (9 Marks CuesLlons)


1Lp|f|n fo||ow|ng
f% 8fs|c Ifrs of L|n
b% L|n sfndfrd d|rcor|s
c% Spr b|ock
Ans
a) 1he baslc feaLures of Llnux are as follows
1) no vlruses
Llnux doesn'L recognlze Wln32 LxecuLable Lhereby maklng lL posslble Lo /have a
vlrusfree sysLem
2) Cpen source
unllke Wlndows Llnux dlsLrlbuLlons are open source and Lhe source code
can be edlLed and modlfled Lo Lhe uLmosL Lo sulL usr needs
3) lree sofLware
Lvery appllcaLlon and sofLware on Llnux ls free and an open source So no more
worrles abouL llcenses! 1hls makes Lhe Llnux a beLLer alLernaLlve Lo a Wlndows
appllcaLlon
4) Lasy Lo use
1he currenL verslons of Llnux are very frlendly and we can even say more
frlendly Lhan any oLher CS ln ease of use
3) Lasy upgrade
Llnux geLs upgraded Lhrough lLs package manager and Lhe same goes for lLs
oLher appllcaLlons lLs up gradaLlon feaLure makes lL unlque and handy as
compared Lo oLher proprleLary sofLware
6) Lxperlence Llve
lL ls anoLher unlque feaLure developed by mosL Llnux companles Lo provlde a
llve envlronmenL for Lhe user now Llnux ls C lndependenL and us can use lL
from any sysLem anywhere ln Lhe world
7) MulLluser envlronmenL
Llnux provldes Lhe real mulLluser envlronmenL whlch means Llnux sysLem can
supporL dlfferenL users wlLh dlfferenL prlvlleges ln Llnux sysLem each user has
access Lo a predeflned seL of sysLem servlces and Lhelr own prlvaLe daLa

b) 1he Llnux sLandard dlrecLorles are as follows
1) / 1he rooLs of Lhe vlrLual dlrecLory normally no flles are
placed here
2) /bln 1he blnary dlrecLory where many Cnu user level uLlllLles are
sLored
3) /booL 1he booL dlrecLory where booL flles are sLored
4) /dev 1he devlce dlrecLory where Llnux creaLes devlce nodes
3) /eLc 1he sysLem conflguraLlon flle dlrecLory
6) /home 1he home dlrecLory where Llnux creaLes user dlrecLorles
7) /llb 1he llbrary dlrecLory where sysLem and appllcaLlon llbrary flles
are sLored
8) /Lmp 1he Lemporary dlrecLory where Lemporary works flles can be
creaLed and desLroyed
9) /usr 1he user lnsLalled sofLware dlrecLory
10)/var 1he varlable dlrecLory for flles LhaL change frequenLly such as
Log flles

c) Super block
A superblock ls a record of Lhe characLerlsLlcs of a flle sysLem lncludlng lLs slze Lhe
block slze Lhe empLy and Lhe fllled blocks and Lhelr respecLlve counLs Lhe slze and locaLlon of
Lhe lnode Lables Lhe dlsk block map and usage lnformaLlon and Lhe slze of Lhe block groups

1he Lerm flle sysLem can refer Lo an enLlre hlerarchy of dlrecLorles or dlrecLory Lree LhaL ls used
Lo organlze flles on a compuLer sysLem Cn unlxllke operaLlng sysLems Lhe dlrecLorles sLarL
wlLh Lhe rooL dlrecLory (deslgnaLed by a forward slash) whlch conLalns a serles of
subdlrecLorles each of whlch ln Lurn conLalns furLher subdlrecLorles eLc A varlanL of Lhls
deflnlLlon ls Lhe parL of Lhe enLlre hlerarchy of dlrecLorles (or of Lhe dlrecLory Lree) LhaL ls
locaLed on a slngle dlsk or parLlLlon A parLlLlon ls a loglcally lndependenL secLlon of a hard dlsk
drlve (Puu) LhaL conLalns a slngle Lype of flle sysLem
An lnode ls a daLa sLrucLure on a flle sysLem on a unlxllke operaLlng sysLem LhaL sLores all Lhe
lnformaLlon abouL a flle excepL lLs name and lLs acLual daLa A daLa sLrucLure ls a way of sLorlng
daLa so LhaL lL can be used efflclenLly dlfferenL Lypes of daLa sLrucLures are sulLed Lo dlfferenL
Lypes of appllcaLlons and some are hlghly speclallzed for speclflc Lypes of Lasks

1Lp|f|n L|n commfnds for f||s fnd d|rcor|s


Ans 1he Llnux commands for flles and dlrecLorles are as follows
a) pwd
1he pwd command wlll dlsplay Lhe currenL dlrecLory
$pwd wlll dlsplay someLhlng slmllar Lo Lhls /home/games/help belng Lhe deLalls
of Lhe currenL dlrecLory
We can know more abouL pwd uslng Lhe followlng command
$ man pwd
b) cd
1o change Lhe dlrecLory'cd' command ls used 1hls command wlll Lake us Lo Lhe
locaLlon we speclfy as argumenL 1he synLax for Lhls command ls menLloned below
$cd locaLlon


Lg $ cd hello
1hls wlll change Lo Lhe dlrecLory named hello locaLed lnslde Lhe currenL
dlrecLory
c) ls
1he ls command ls used Lo see Lhe conLenLs of Lhe currenL dlrecLory
1he synLax for Lhls command ls menLloned below
$ ls


Some of Lhe mosL common swlLches are llsLed below
1 ls a 1hls wlll llsL all Lhe flles lncludlng Lhose beglnnlng wlLh Lhe '' LhaL
would normally be hldden from Lhe user's vlew
2 ls l 1hls glves a long llsL of flle aLLrlbuLes and flle permlsslons
3 ls s 1hls wlll dlsplay Lhe llsLlng showlng Lhe slze of each flle rounded up Lo
Lhe nearesL kllobyLe
4 ls S 1hls wlll llsL Lhe flles accordlng Lo Lhe flle slze
3 ls C 1hls glves Lhe llsLlng dlsplayed ln columns
6 ls l 1hls glves a symbol nexL Lo each flle ln Lhe llsLlng showlng Lhe flle
Lype
7 ls r 1hls glves Lhe llsLlng ln reverse order
8 ls 8 1hls glves a recurslve llsLlng of all dlrecLorles and menLlons below LhaL
where Lhe command was lssued


d) chmod
1hls command ls used L change Lhe mode for flles 1o know more abouL Lhls
command we should go Lo Lhe ermlsslons secLlon

SynLax
#chmod valueflle or dlrecLory name

1hls command can only be used by user havlng admlnlsLraLlve rlghLs lor a lndepLh
learnlng of Lhe command we have Lo walL Llll flle and dlrecLory permlsslons have been
explalned

e) cp
1he cp command coples flles and dlrecLorles We can copy a flle wlLhln Lhe
currenL dlrecLory or Lo anoLher dlrecLory

SynLax
$cp sourcedesLlnaLlon

f) rm
1he rm command ls used Lo deleLe Lhe flles geL rld of unwanLed flles
SynLax ls
$ rm fllename

Llke all Llnux commands 'rm' also has some powerful swlLches whlch can be used wlLh
Lhe rm command 1hese swlLches enhance Lhe funcLlonlng of Lhe rm command Lhereby
maklng lL fasLer and responslve lor example Lo deleLe myflle we can use followlng
command
$ rm myflle
1hls wlll ask for our permlsslon Lo deleLe buL conversely lf we use f" swlLch llke
$ rm f myflle Lhe flle wlll be deleLed wlLhouL Laklng any permlsslon

1he oLher swlLches are
$ rm l 1hls operaLes rm command ln an lnLeracLlve mode meanlng lL wlll prompL us
before deleLlng a flle
$ rm f 1hls wlll force by passlng any safeguards LhaL may be ln place such as
prompLlng
$ rm r 1hls wlll deleLe every flle and sub dlrecLory below LhaL ln whlch Lhe command
was glven

g) mkdlr
1he mkdlr command ls used Lo creaLe a new dlrecLory
1he synLax for Lhls command ls menLloned below
$mkdlr name of dlrecLory
1o creaLe MyulrdlrecLory Lhe command wlll be
$mkdlr Myulr
1hls wlll make a dlrecLory wlLhln Lhe currenL dlrecLory called mydlr


h) mv
1hls command ls used whenever we wanL Lo move flles or dlrecLorles
from one locaLlon Lo anoLher or rename a flle or a dlrecLory
1he mv command moves flles from one locaLlon Lo anoLher
SynLax
$mv sourcedesLlnaLlon
WlLh Lhe mv command Lhe flle wlll be moved and wlll no longer exlsL ln lLs orlglnal
locaLlon prlor Lo lssulng Lhe mv command

1SLp|f|n mfnfg|ng m||p| procsss |n L|n A|so p|f|n procss scd||ng
Ans ln Llnux mulLlple processes are malnLalned by Lhe Llnux kernel
Some of Lhe Lools for worklng wlLh processes are as follows
a) accLon 1urns process accounLlng on and off
b) klll kllls a process by number
c) klllall Sends a slgnal Lo a process by name
d) lasLcomm(1) ulsplays lnformaLlon abouL prevlous commands ln reverse order
Works only lf process accounLlng ls on
e) nlce SeLs process prlorlLy of new processes
f) ps(1) used Lo reporL Lhe sLaLus of one or more processes
g) psLree(1) ulsplays Lhe Lree of runnlng processes
h) renlce(8) Can be used Lo change Lhe process prlorlLy of a currenLly runnlng
process
l) sa(8) CeneraLes a summary of lnformaLlon abouL users' processes LhaL are
sLored ln Lh /var/log/pacL flle
[) sklll 8eporLs process sLaLus
k) snlce 8eporLs process sLaLus
l) Lop ulsplays Lhe processes LhaL are uslng Lhe mosL Cu resources




rocess Schedullng
ln Llnux kernel conLrols Lhe process schedullng 1here are Lhree Lypes of
Schedullng
a) normal 1hls ls Lhe schedullng Lype seL for normal programs
b) lllC 1hls ls a real Llme schedullng prlorlLy 1he Lerm lllC means Lhe flrsL
process sLarLed wlll be flrsL done 1he only Llme Lhls Lype of process
exlsLs ls lf lL sleeps ls rescheduled or lf lL musL walL on oLher kernel
prlorlLles Lo be done
c) 88 1hls ls a round robln Lype of schedullng where each Lask geLs a cerLaln
amounL of Llme Lhen lL musL exlL yleld conLrol Lo Lhe nexL Lask and geL
back lnLo Lhe Lask queue 1hls ls a real Llme schedullng prlorlLy

16Lp|f|n pr|n|ng commfnds |n df||
17Lp|f|n procss of mfnfg|ng sr fccons |n df||
Ans 1he mosL lmporLanL Lask for any sysLem admlnlsLraLor ls Lo manage lLs user accounLs
lf he ls sysLemaLlc and professlonal he can manage wlLhouL any ma[or problems 1he process of
user accounL managemenL lnvolves followlng sLeps

o JJloq o oset

1he Llnux kernel lLself LreaLs users are mere numbers Lach user ls ldenLlfled by
a unlque lnLeger Lhe user ld or uld because numbers are fasLer and easler for a
compuLer Lo process Lhan LexLual names A separaLe daLabase ouLslde Lhe kernel asslgns
a LexLual name Lhe username Lo each user ld 1he daLabase conLalns addlLlonal
lnformaLlon as well
MosL Llnux dlsLrlbuLlons come wlLh a program for creaLlng accounLs 1here are several
such programs avallable 1wo command llne alLernaLlves are fddsr and srfdd
Lhere may be a Cul Lool as well
1he baslc user daLabase ln a unlx sysLem ls Lhe LexL flle ]c]pfsswd (called Lhe
password flle) whlch llsLs all valld usernames and Lhelr assoclaLed lnformaLlon 1he flle
has one llne per username and ls dlvlded lnLo seven colondellmlLed flelds
O username
O revlously Lhls was where Lhe users password was sLored
O numerlc user ld
O numerlc group ld
O lull name or oLher descrlpLlon of accounL
O Pome dlrecLory
O Logln shell (program Lo run aL logln)
MosL Llnux sysLems use shadow passwords As menLloned prevlously passwords were
sLored ln Lhe ]c]pfsswd flle 1hls newer meLhod of sLorlng Lhe password Lhe
encrypLed password ls sLored ln a separaLe flle ]c]sfdow whlch only rooL can read
1he ]c]pfsswd flle only conLalns a speclal marker ln Lhe second fleld Any program
LhaL needs Lo verlfy a user ls seLuld and can Lherefore access Lhe shadow password flle
5electloq Nometlc usets ooJ Ctoop lus
Cn mosL sysLems lL doesnL maLLer whaL Lhe numerlc user and group lds are buL
lf us use Lhe neLwork flle sysLem (nlS) us need Lo have Lhe same uld and gld on all
sysLems 1hls ls because nlS also ldenLlfles users wlLh Lhe numerlc ulds lf us arenL
uslng nlS us can leL usr accounL creaLlon Lool plck Lhem auLomaLlcally lf us are uslng
nlS usll have Lo be lnvenLlng a mechanlsm for synchronlzlng accounL lnformaLlon Cne
alLernaLlve ls Lo Lhe nlS sysLem Powever us should Lry Lo avold reuslng numerlc ulds
(and LexLual usernames) because Lhe new owner of Lhe uld (or username) may geL
access Lo Lhe old owners flles

c loltlol ovltoomeot /etc/skel
When Lhe home dlrecLory for a new user ls creaLed lL ls lnlLlallzed wlLh flles
from Lhe ]c]sk| dlrecLory 1he sysLem admlnlsLraLor can creaLe flles ln ]c]sk| LhaL
wlll provlde a nlce defaulL envlronmenL for users lor example he mlghL creaLe a
]c]sk|]prof|| LhaL seLs Lhe Lul1C8 envlronmenL varlable Lo some edlLor LhaL ls
frlendly Lowards new users
Powever lL ls usually besL Lo Lry Lo keep ]c]sk| as small as posslble slnce lL wlll be
nexL Lo lmposslble Lo updaLe exlsLlng users flles lor example lf Lhe name of Lhe
frlendly edlLor changes all exlsLlng users would have Lo edlL Lhelr prof|| 1he sysLem
admlnlsLraLor could Lry Lo do lL auLomaLlcally wlLh a scrlpL buL LhaL ls almosL cerLaln
golng Lo break someones flle
Whenever posslble lL ls beLLer Lo puL global conflguraLlon lnLo global flles such as
]c]prof|| 1hls way lL ls posslble Lo updaLe lL wlLhouL breaklng users own seLups

J cteotloq o oset moooolly
1o creaLe a new accounL manually follow Lhese sLeps
O LdlL ]c]pfsswd wlLh v|pw and add a new llne for Lhe new accounL 8e careful
wlLh Lhe synLax uo noL edlL dlrecLly wlLh an edlLor! v|pw locks Lhe flle so LhaL
oLher commands wonL Lry Lo updaLe lL aL Lhe same Llme us should make Lhe
password fleld be * so LhaL lL ls lmposslble Lo log ln
O Slmllarly edlL ]c]grop wlLh v|gr lf us need Lo creaLe a new group as well
O CreaLe Lhe home dlrecLory of Lhe user wlLh mkd|r
O Copy Lhe flles from ]c]sk| Lo Lhe new home dlrecLory
O llx ownershlps and permlsslons wlLh cown and cmod 1he k opLlon ls mosL
useful 1he correcL permlsslons vary a llLLle from one slLe Lo anoLher buL usually
Lhe followlng commands do Lhe rlghL Lhlng


cd ]om]nwsrnfm
cown k srnfmgrop
cmod k gogow
cmod go
O SeL Lhe password wlLh pfsswd
AfLer us seL Lhe password ln Lhe lasL sLep Lhe accounL wlll work us shouldnL seL lL unLll
everyLhlng else has been done oLherwlse Lhe user may lnadverLenLly log ln whlle usre
sLlll copylng Lhe flles
e cbooqloq oset ptopettles
1here are a few commands for changlng varlous properLles of an accounL (le
Lhe relevanL fleld ln ]c]pfsswd )
O cfn Change Lhe full name fleld
O cs Change Lhe logln shell
O pfsswd Change Lhe password

1he superuser may use Lhese commands Lo change Lhe properLles of any accounL
normal users can only change Lhe properLles of Lhelr own accounL lL may someLlmes be
necessary Lo dlsable Lhese commands (wlLh cmod) for normal users

f kemovloq o oset
1o remove a user we flrsL musL remove all hls flles mallboxes mall allases
palnL[obs cron and f [obs and all oLher references Lo Lhe user 1hen us remove Lhe
relevanL llnes from ]c]pfsswd and ]c]grop (remember Lo remove Lhe username
from all groups lLs been added Lo) lL may be a good ldea Lo flrsL dlsable Lhe accounL
(see below) before us sLarL removlng sLuff Lo prevenL Lhe user from uslng Lhe accounL
whlle lL ls belng removed
8emember LhaL users may have flles ouLslde Lhelr home dlrecLory 1he f|nd command
can flnd Lhem

flnd / user username
Powever noLe LhaL Lhe above command wlll Lake a looq Llme lf us have large dlsks lf us
mounL neLwork dlsks us need Lo be careful so LhaL us wonL Lrash Lhe neLwork or Lhe
server


q ulsolloq o oset tempototlly
1he besL way Lo dlsable an accounL ls Lo change lLs shell lnLo a speclal program
LhaL [usL prlnLs a message 1hls way whoever Lrles Lo log lnLo Lhe accounL wlll fall and
wlll know why 1he message can Lell Lhe user Lo conLacL Lhe sysLem admlnlsLraLor so
LhaL any problems may be dealL wlLh
lL would also be posslble Lo change Lhe username or password Lo someLhlng else buL
Lhen Lhe user wonL know whaL ls golng on Confused users mean more work
A slmple way Lo creaLe Lhe speclal programs ls Lo wrlLe Lall scrlpLs
#!/usr/bln/Lall +2
1hls accounL has been closed due Lo a securlLy breach
lease call 3331234 and walL for Lhe men ln black Lo arrlve
1he flrsL Lwo characLers (" ) Lell Lhe kernel LhaL Lhe resL of Lhe llne ls a command LhaL
needs Lo be run Lo lnLerpreL Lhls flle 1he f|| command ln Lhls case ouLpuLs everyLhlng
excepL Lhe flrsL llne Lo Lhe sLandard ouLpuL
lf user blllg ls suspecLed of a securlLy breach Lhe sysLem admlnlsLraLor would do
someLhlng llke Lhls
cs s
]sr]|ocf|]||b]no|og|n]scr|y b|||g
s sr
1hls accounL has been closed due Lo a securlLy breach
lease call 3331234 and walL for Lhe men ln black Lo arrlve

1he purpose of Lhe s ls Lo LesL LhaL Lhe change worked of course
1all scrlpLs should be kepL ln a separaLe dlrecLory so LhaL Lhelr names donL lnLerfere
wlLh normal user commands








18 Lp|f|n fo||ow|ng
f% 8fckp fnd ksor
b% I|| Scr|y
c% I|| rm|ss|on
Ans a) 8ackup and 8esLore
We can back up and resLore usr sysLem wlLh Lhe dump and resLore uLlllLles
dump can backup usr enLlre sysLem or perform lncremenLal backups savlng only Lhose
flles LhaL have changed slnce Lhe lasL backup dump supporLs several opLlons for
managlng Lhe backup operaLlon such as speclfylng Lhe slze and lengLh of sLorage medla
1he varlous dump opLlons are as follows

a 09 Speclfy Lhe dump level A dump level 0 ls a full


backup copylng Lhe enLlre flle sysLem (see also Lhe
opLlon) dump level numbers above 0 perform
lncremenLal backups copylng all new or modlfled flles
new ln Lhe flle sysLem slnce Lhe lasL backup aL a lower
level 1he defaulL level ls 9
b 8 records LeLs us speclfy Lhe number of blocks ln a volume
overrldlng Lhe endofmedla deLecLlon or lengLh and
denslLy calculaLlons LhaL dump normally uses for
mulLlvolume dumps
c a LeLs dump bypass any Lape lengLh calculaLlons and
wrlLe unLll an end of medla lndlcaLlon ls deLecLed
8ecommended for mosL modern Lape drlves and ls Lhe
defaulL
d b blockslze LeLs us speclfy Lhe number of kllobyLes per dump
record WlLh Lhls opLlon us can creaLe larger blocks
speedlng up backups

1he dump uLlllLy uses Jomp levels Lo deLermlne Lo whaL degree us wanL usr
sysLem backed up A dump level of 0 wlll copy flle sysLems ln Lhelr enLlreLy 1he
remalnlng dump levels perform lncremenLal backups only backlng up flles and
dlrecLorles LhaL have been creaLed or modlfled slnce Lhe lasL lowerlevel backup A
dump level of 1 wlll only back up flles LhaL have changed slnce Lhe lasL level 0 backup
1he dump level 2 ln Lurn wlll only back up flles
LhaL have changed slnce Lhe lasL level 1 backup (or 0 lf Lhere ls no level 1) and so on up
Lo dump level 9

We use Lhe rsor command Lo elLher resLore an enLlre flle sysLem or Lo [usL
reLrleve parLlcular flles resLore wlll exLracL flles or dlrecLorles from a backup archlve and
copy Lhem Lo Lhe currenL worklng dlrecLory Make sure us are ln Lhe dlrecLory us wanL
Lhe flles resLored Lo when us run resLore resLore wlll also generaLe any subdlrecLorles
as needed resLore has several opLlons for managlng Lhe resLore operaLlon

a C LeLs you check a backup by comparlng flles on a
flle sysLem wlLh Lhose ln a backup
b l 1he lnLeracLlve mode for resLorlng parLlcular flles
and dlrecLorles ln a backup A shell lnLerface ls
generaLed where Lhe user can use commands Lo speclfy
flles and dlrecLorles Lo resLore
c 8 Wlll lnsLrucL resLore Lo requesL a Lape LhaL ls parL of
a mulLlvolume backup from whlch Lo conLlnue Lhe
resLore operaLlon Pelpful when mulLlvolume resLore
operaLlons are lnLerrupLed
d r 8esLore a flle sysLem Make sure LhaL a newly
formaLLed parLlLlon has been mounLed and LhaL you
have changed Lo lLs Lop dlrecLory
b) llle securlLy
1he Llnux securlLy model ls based on Lhe one used on unlx sysLems and
ls as rlgld as Lhe unlx securlLy model (and someLlmes even more) whlch ls already
qulLe robusL Cn a Llnux sysLem every flle ls owned by a user and a group user 1here
ls also a Lhlrd caLegory of users Lhose LhaL are noL Lhe user owner and donL belong
Lo Lhe group ownlng Lhe flle lor each caLegory of users read wrlLe and execuLe
permlsslons can be granLed or denled

c) llle ermlsslons
AlLhough Lhere are already a loL of good securlLy feaLures bullL lnLo Llnuxbased
sysLems one very lmporLanL poLenLlal vulnerablllLy can exlsL when local access ls
granLed LhaL ls flle permlsslon based lssues resulLlng from a user noL asslgnlng Lhe
correcL permlsslons Lo flles and dlrecLorles

1he 8aslc llle ermlsslons are as follows

rm|ss|on Grops
Lach flle and dlrecLory has Lhree user based permlsslon groups
O ownr 1he Cwner permlsslons apply only Lhe owner of Lhe flle or dlrecLory
Lhey wlll noL lmpacL Lhe acLlons of oLher users
O grop 1he Croup permlsslons apply only Lo Lhe group LhaL has been asslgned
Lo Lhe flle or dlrecLory Lhey wlll noL effecL Lhe acLlons of oLher users
O f|| srs 1he All users permlsslons apply Lo all oLher users on Lhe sysLem Lhls
ls Lhe permlsslon group LhaL you wanL Lo waLch Lhe mosL
rm|ss|on 1yps
Lach flle or dlrecLory has Lhree baslc permlsslon Lypes
O rfd 1he 8ead permlsslon refers Lo a users capablllLy Lo read Lhe conLenLs of
Lhe flle
O wr| 1he WrlLe permlsslons refer Lo a users capablllLy Lo wrlLe or modlfy a flle
or dlrecLory
O c 1he LxecuLe permlsslon affecLs a users capablllLy Lo execuLe a flle or
vlew Lhe conLenLs of a dlrecLory
1 Lp|f|n fny on s|| of L|n |n df|| Jf fr d|ffrn fvf||fb| s||s?
Ans 8ourne Shell
1he 8ourne shell ls Lhe orlglnal unlx shell (command execuLlon program ofLen
called a commooJ lotetptetet) LhaL was developed aL A11 named for lLs developer
SLephen 8ourne Lhe 8ourne shell ls also known by lLs program name sb 1he shell
prompL (characLer dlsplayed Lo lndlcaLe readlness for lnpuL) used ls Lhe 5 symbol 1he
8ourne shell famlly lncludes Lhe 8ourne korn shell bash and zsh shells
8ourne Agaln Shell (8ash) ls Lhe free verslon of Lhe 8ourne shell dlsLrlbuLed wlLh Llnux
sysLems 8ash ls slmllar Lo Lhe orlglnal buL has added feaLures such as command llne
edlLlng
Zsh was developed by aul lalsLad as a replacemenL for boLh Lhe 8ourne and C shell lL
lncorporaLes feaLures of all Lhe oLher shells (such as flle name compleLlon and a hlsLory
mechanlsm) as well as new capablllLles Zsh ls consldered slmllar Lo Lhe korn shell
lalsLad lnLended Lo creaLe ln zsh a shell LhaL would do whaLever a programmer mlghL
reasonably hope lL would do Zsh ls popular wlLh advanced users
Along wlLh Lhe korn shell and Lhe C shell Lhe 8ourne shell remalns among Lhe Lhree
mosL wldely used and ls lncluded wlLh all unlx sysLems 1he 8ourne shell ls ofLen
consldered Lhe besL shell for developlng scrlpLs
1he dlfferenL shells avallable ln llnux are as follows

a) ash 1he AlmqulsL shell(also known as A Shell or ash) was orlglnally a
clone of Lhe 8ourne shell lL ls a fasL small CSlx compaLlble
unlx shell deslgned Lo replace Lhe 8ourne Shell lL dld noL
feaLure llne edlLlng or command hlsLory mechanlsms orlglnally
b) bash lL ls a unlx shell wrlLLen for Lhe Cnu pro[ecL 1he name of Lhe
acLual execuLable ls bash whlch ls an acronym for 8ourne agaln
shell 8ash ls Lhe defaulL shell on mosL Llnux sysLems as well as
on Mac CS x and lL can be run on mosL unlxLlke operaLlng
sysLems
c) csh 1he C shell ls a unlx shell developed by 8lll !oy for Lhe 8Su unlx
sysLem lLs synLax ls modeled afLer Lhe C programmlng language
and conLalns many added feaLure lmprovemenLs over Lhe
8ourne Shell
d) es 1he es shell ls a command llne lnLerpreLer LhaL uses a scrlpLlng
language slmllar Lo Lhe rc shell lL ls lnLended Lo provlde a fully
funcLlonal programmlng language as a unlx shell
e) ksh lL ls also known as korn shell lL ls a programmlng shell
compaLlble wlLh 8ourne shell buL supporLlng advanced
programmlng feaLure llke assoclaLlve arrays and floaLlng polnL
arlLhmeLlc



f) rc 1he rc shell ls Lhe command llne lnLerpreLer for verslon 10 unlx
lL resembles Lhe 8ourne shell buL lLs synLax ls somewhaL
slmpler lL was developed by 1om uuff who ls beLLer known for
a unusual C programmlng language consLrucL called uuff's
devlce
g) 1csh Lcsh ls a unlx shell largely based on and compaLlble wlLh Lhe C
shell 1hls shell lncorporaLes elemenLs from Lhe C programmlng
language lnLo Lhe shell scrlpLs
h) Zsh zsh shell ls an advanced shell LhaL lncorporaLes feaLures from
8ash Lcsh and korn shell provldlng advanced feaLures shared
memory eLc

20 Lp|f|n cond||onf| fnd |oop|ng sfmns |n s|| progrfmm|ng
Ans CondlLlonal SLaLemenLs
CondlLlonal sLaLemenLs are an lmporLanL parL of Lhe baslc bulldlng blocks of shell
scrlpLlng 1hese allow us Lo declde programmaLlcally wheLher Lo execuLe a block of sLaLemenLs
based on a loglcal LesL CondlLlonal sLaLemenLs are malnly used ln shell programs Lo declde
whlch parL of Lhe program Lo execuLe dependlng on speclfled condlLlons 1he condlLlonal
sLaLemenLs are as follows

1he lf SLaLemenL

1he lf sLaLemenL evaluaLes a loglcal expresslon Lo make a declslon An lf condlLlon has
Lhe followlng formaL ln bash
lf expresslon Lhen
SLaLemenLs
ellf expresslon Lhen
SLaLemenLs
else
SLaLemenLs
fl

1he lf condlLlons can be nesLed whlch means an lf condlLlon can conLaln anoLher lf condlLlon
wlLhln lL lL ls noL necessary for an lf condlLlon Lo have an ellf or else 1he else parL ls execuLed lf
none of Lhe expresslons LhaL are speclfled ln Lhe lf sLaLemenL are Lrue

1he word fl ls used Lo lndlcaLe Lhe end of Lhe lf sLaLemenLs whlch ls very useful lf we have
nesLed lf condlLlons ln such a case we should be able Lo maLch fl Lo lf Lo ensure LhaL all lf
sLaLemenLs are properly coded

Lg
lf $var"?es" Lhen
echo value ls ?es"
ellf $var no" Lhen
echo value ls no"
else
echo lnvalld value"
fl
1he Case SLaLemenL
1he case sLaLemenL ls used Lo execuLe sLaLemenLs dependlng on a dlscreLe value or a
range of values maLchlng Lhe speclfled varlable ln mosL cases lf we have a large number of
condlLlons Lhen we can use a case sLaLemenL lnsLead of an lf sLaLemenL

1he formaL of a case sLaLemenL ls as follows
case sLr ln
sLr1|sLr2)
SLaLemenLs
sLr3|sLr4)
SLaLemenLs
*)
SLaLemenLs
esac

Lg

#!/bln/bash

case $1 ln
01 | 1) echo MonLh ls !anuary"
02 | 2) echo MonLh ls lebruary"
03 | 3) echo MonLh ls March"
04 | 4) echo MonLh ls Aprll"
03 | 3) echo MonLh ls May"
06 | 6) echo MonLh ls !une"
07 | 7) echo MonLh ls !uly"
08 | 8) echo MonLh ls AugusL"
09 | 9) echo MonLh ls SepLember"
10) echo MonLh ls CcLober"
11) echo MonLh ls november"
12) echo MonLh ls uecember"
*) echo lnvalld parameLer"
esac


Looplng or lLeraLlon SLaLemenLs
Shell sclpLs wrlLLen ln bash can lmplemenL looplng or lLeraLlon sLaLemenLs 1he
common consLrucLs are as follows
O for
O whlle
O unLll






1he for sLaLemenL
1he for sLaLemenL has a number of formaLs 1he flrsL formaL ls as follows
for curvar ln llsL
do
SLaLemenLs
done

1hls form should be used lf we wanL Lo execuLe sLaLemenLs once for each value ln a llsL

1he second formaL ls as follows
for curvar
do
SLaLemenLs
done
ln Lhls form Lhe sLaLemenLs are execuLed once for each of Lhe poslLlonal parameLers passed Lo
Lhe shell program


Lg

#!/bln/bash
for fllename ln 'ls'
do
cp $fllename backup/$fllename
lf $? ne 0 Lhen
echo copy for $fllename falled"
fl
done


1he Whlle SLaLemenL
1he whlle sLaLemenL can be used Lo execuLe a serles of commands whlle a speclfled
condlLlon ls Lrue 1he loo LermlnaLes as soon as Lhe speclfled condlLlon evaluaLes Lo false lL ls
posslble LhaL Lhe loop wlll noL execuLe aL all lf Lhe speclfled condlLlon evaluaLes Lo false rlghL aL
Lhe beglnnlng

1he followlng frmaL ls used
whlle expresslon
do
SLaLemenLs
uone

Lg
#!/bln/bash
loopcounL 0
resulLo
whlle $loopcounL lL 3
do
loopcounL'expr $loopcounL +1'
lncremenL 'expr $loopcounL *2'
resulL'expr $resulL + $lncremenL'
done
echo resulL ls $resulL"


1he unLll sLaLemenL
1he unLll sLaLemenL can be used Lo execuLe a serles of commands unLll a speclfled
condlLlon ls Lrue 1he loop LermlnaLes as soon as Lhe speclfled condlLlon evaluaLes Lo Lrue

1he followlng formaL ls used
unLll expresslon
do
SLaLemenLs
done

Lg
#!/bln/bash
loopcounL 0
resulL0
unLll $loopcounL ge 3
do
loopcounL'expr $loopcounL +1'
lncremenL 'expr $loopcounL*2'
resulL'expr $resulL + $lncremenL'
done
echo"resulL ls $resulL"


1he selecL sLaLemenL
1he selecL sLaLemenL ls used Lo generaLe a menu llsL lf you are wrlLlng a shell program
LhaL expecLs onllne lnpuL from Lhe user 1he formaL of Lhe selecL sLaLemenL ls as follows

selecL lLem ln lLemllsL
do
SLaLemenLs
done

Lg

#!/bln/bash
selecL lLem ln conLlnue flnlsh
do
lf $lLem "flnlsh" Lhen
break
fl
done
21 Lp|f|n f|| s|mp| f||r commfnds
Ans A fllLer Lakes Lhe sLandard lnpuLperforms some acLlon on lLand Lhen reLurns lL as a
sLandard ouLpuL Llnux has a large number of fllLers Some useful ones are Lhe commands
awkgrepsedspell and wc

1he flrsL fllLer grep removes any dlrecLorles from Lhe llsL by excludlng any llnes LhaL sLarL wlLh a
leadlng d
grep v d"
1he nexL fllLer awk exLracLs Lhe requlred flelds fllename username access daLe and Llme and
flle slze lL also places Lhe flle slze aL Lhe sLarL llne so LhaL Lhe daLa ls ready for sorLlng

awk 'prlnL $3 $8 $3 $6 $7'

obvlously Lhe nexL fllLer sorLs Lhe daLa

sorL nr

And Lhe flnal fllLer anoLher awk formaLs Lhe daLa ready Lo be emalled

awk 'prlnL $2 "L" $3 "L" $4 $3 "L" $1'

1here are many llnux fllLer commands ln addlLlon Lo awkgrep and sorL1wo fllLers Lo conslder
are Lr(LranslaLe) and sed(sLream edlL) ln each caseboLh Lhe commands allow us Lo modlfy a
sLream Lr for slmple changes and sed for more complex ones We can use LrazAZ Lo
converL everyLhlng Lo uppercase or sed s/"*"//g Lo remove asLerlsks from Lhe names of
execuLable flles

AnoLher lmporLanL fllLer ls Leewhlch enables us Lo spllL a sLream beLween sLandard ouLpuL and
a flle for example

ls l | Lee fllelsL | wc 1
1hls wlll creaLe a flle(fllelsL)conLalnlng Lhe resulL from lsl and wlll dlsplay Lhe number of flles Lo
Lhe screen


22 Lp|f|n k w|ndows conf|grf|on Compfr kDL fnd GNCML grfp|cf| |nrffcs
Ans x wlndows ls Lhe sLandard graphlcal user lnLerface for Llnux Llke oLher graphlcal user
lnLerfaces such as MlcrosofL Wlndows and Mac CS x leLs you lnLeracL wlLh programs by uslng a
mouse (or oLher polnLlng devlce) Lo polnL and cllck provldlng a slmple means of communlcaLlng
wlLh your compuLer x wlndows ls a remarkable and very modern sofLware sysLem a cross
plaLform neLworkorlenLed graphlcal user lnLerface lL runs on a wlde varleLy of plaLforms
lncludlng essenLlally every varleLy of unlx x CllenLs are avallable for use for example under
Wlndows 3x 9x and n1 1he sophlsLlcaLed neLworklng capablllLles of x leL you run a program
on one compuLer whlle vlewlng Lhe graphlcal ouLpuL on anoLher compuLer connecLed Lo Lhe
flrsL vla a neLwork WlLh Lhe advenL of Lhe lnLerneL whlch lnLerconnecLed a slzable fracLlon of
Lhe compuLers on Lhe planeL x achleved a new helghL of lmporLance and power


lnsLalllng x wlndows
CeLLlng a proper x Wlndow SysLem up and runnlng used Lo be a real challenge on Llnux
almosL a rlLe of passage 1oday devlce drlvers are avallable for a much wlder array of hardware
and conflguraLlon Lools Lo asslsL ln Lhe seLup process have greaLly lmproved Whlle sLlll Lrlcky aL
Llmes especlally wlLh unusual hardware x seLup and conflguraLlon ls no longer Lhe daunLlng
process lL once was and should be relaLlvely easy
?oull go Lhrough Lwo sLages before you have x successfully runnlng 1he flrsL sLage lnvolves
lnsLalllng Lhe needed programs LhaL enable x Lo run 1hese can be grouped lnLo several
caLegorles
O 8aslc xlree86 program
O x servers
O Wlndow Managers
O AppllcaLlons
O lonLs
1hls sLage ls very sLralghLforward and can even be done as parL of Lhe baslc lnsLallaLlon process
lf you selecL Lhe relevanL x packages durlng LhaL sLep
ln Lhe second sLage you conflgure x Lo run properly on your sysLem 1hls ls a maLLer of
ldenLlfylng an x server compaLlble wlLh your graphlcs card and Lunlng Lhe server for your
graphlcs card lf you have a common card and all Lhe documenLaLlon for lL Lhls second sLage wlll
be relaLlvely slmple Mlsslng lnformaLlon makes Lhe process harder buL noL lmposslble
Conflgurlng x wlndows
When you lnsLall Lhe setvetcommoo package xf86conflg ls auLomaLlcally launched
Powever you can launch Lhe program any Llme you llke 1o do so log ln as rooL and Lype Lhe
command
xf86conflg

kuL deskLop
kuL (Lhe k ueskLop LnvlronmenL) ls a freely avallable deskLop LhaL lncludes kWM Lhe k
Wlndow Manager as an lnLegral componenL kuL provldes a flle manager a help sysLem a
conflguraLlon uLlllLy and a varleLy of accessorles and appllcaLlons lncludlng
O Cames such as kmlnes kpoker and kLeLrls
O Craphlcal appllcaLlons such as kfracL a fracLal generaLor and kvlew an lmage vlewer
O MulLlmedla appllcaLlons such as kmlx a sound mlxer and kmedla a medla player
O neLwork appllcaLlons such as kmall a mall cllenL knu a neLwork uLlllLy and krn a news
cllenL
AlLhough kuL ls freely redlsLrlbuLable kuL uses Lhe C1 wldgeL seL Lo creaLe user lnLerface
conLrols 1hls presenLs a problem because C1 ls dlsLrlbuLed under a nonfree llcense LhaL many
developers dlsllke 1herefore Lhe mosL popular deskLop envlronmenL ln Lhe uS has been and
conLlnues Lo be CnCML raLher Lhan kuL

CnCML deskLop
CnCML ls a freely avallable deskLop LhaL can be used wlLh any of several wlndow
managers lncludlng LnllghLenmenL unllke kuL CnCML ls open source sofLware
Cne of CnCMLs mosL lnLeresLlng feaLures ls sesslon awareness When you reenLer CnCML lL
reconflgures your deskLop Lo maLch Lhe sLaLe aL Lhe Llme you exlLed by launchlng each
appllcaLlon LhaL was open when you exlLed CnCML even resLores each appllcaLlon Lo lLs former
sLaLe by for example movlng Lo Lhe page LhaL was open when you exlLed
CnCML provldes deskLop Lools slmllar Lo Lhose of kuL lncludlng
O Cames such as lreeCell CnoboLs CnomeLrls and Cnome Mlnes
O 1he Cnu lmage ManlpulaLlon rogram (ClM)
O neLwork appllcaLlons such as Mallman whlch helps you Lrack your malllng llsLs 1alk whlch
leLs you exchanged Lyped messages wlLh anoLher user ln real Llme and Synchronlze whlch
leLs you synchronlze flles on mulLlple sysLems
O MulLlmedla appllcaLlons such as Audlo Mlxer and Cu layer
O Ceneral appllcaLlons such as gLdlL a LexL edlLor neLscape navlgaLor a Llnux verslon of Lhe
popular browser and Cnumerlc a spreadsheeL
O uLlllLles for conflgurlng CnCML and your Llnux sysLem

You might also like