You are on page 1of 17

Page No

Date:_
Practfcoul2
Aim aloraînq wih nnub Amd init e

Soluhions
GRuB Oroce
axuh Ataads Y he nandest acXDAum9anol unied-
a0ot Laade
EAa neAu baot Ame opehatinqAyslem loade a t Red
Ha 2 entasrageyou to use as he dafault hat laades
fastead Lela
ub eena a much mare plabaxahe raphfeak Ineskace-
At baot ne apesale n the Aameashtaa ging uaua
bakic chnice betuer uhich instaled behnel J

un

Gub slasls ih Counding at O fhsteadeL


Gubuse ehain Jondes do laad amy ogebclins Aystem
taa 1 doe net suppa
uda pouides a useh Chafce to haot ane e ultle os
instalked on c Computer oY Aelecta ApeeiAie kesne
Congigurtionavaflable on A padiulah 0s pabHLtah

proce
Init Proce u Steps as ollas
0Lniialfgalian
Re Serípt
Run leel
Sitoinq aa Ocmd shudhinsa down.

AtT tude
Page No:

Date

Lnf scipt detexaines uhat Pag raa tentup A hoot


Hfme
Ta A theirs roce that Atasd in a Linux Austem
a e he aachine bon end the_beneklaads inta menaaa
Tnt Anaong otihen thing decides hoaUSe pCLAA
ey Ausem Aehuice should Atat Qutanaalcelly
lo use otehackive made, uouy Aic aeedi n haue loaded
Hhe ntt prace Sucesal
Init ia a daeman pocpla kaat Coniaues uninaurtil_He syahcna
h u t down
bom thid ene Cam be lansfdenedas a backgrnund
procega
Tatt xeada he ialthl cenkizushaian sciphs uhich basicaly ake
Cone o Paesyhing hat aAustepa dag at the ine st Aystem
inidialigatian
Init detemines he the yslenm shauld he Adup.

AEtude
Page No
Date:
Pacical
Aim Batic lfnuk Comaamds

Salufan
A clixectanu contemd uou knou uindauus uau mauld-
kns dhat-he coranaanddis i used to at the cantedd a
a dixekan To i u , he e Lammand fa ed o i out
ilea aad dfrectaies AHLibuhe A commomoA

Dpions
A-Hiddem le heqia idh a dot Lese ane celaia
hiddemle in eeh dice.ckaaha namalycdant Bhau up
n he lisn Tae - a oplfanLa) 1Mats al Hhe biddemles
alonq with he othesila
8-Ib"h°Atanada go humom xeadnble 4axmat uwhich iln
displayLile sige in eadye-undesatanad orenat ie M_ox
M gar Ka omd for Due to this the size e4le
in am easy-to- undesstamd rmat
-f hia eommomd w mask alldhe erecukabie lex
uith*amd lit Abe directones wh 2 chaactes at he end
dou cam reueAse the odes eHheles uthhe -
evehse) opfon uth he names soxtedinevense AsCl caltahiag
Aequemte
-B The -2oemstre)_apdion lith_audirectmie amd
Subdiecdaies laa director ttee he hauenaal e
Ahe direct hee iadone ecsaiuely hese axe na
Sub dhe ctoies elt,

ATHturte
Page No
Date:

pwd iot intayking Dizecham


One way ilem dhe directa ohewmking lo fa he
Pd Caom.amd dkplaushecunseandwokiac- daecto
pa amd i uce.fal when dien chacnges ae ete
3. mbdir to make a_direckary
kdir Ldiectony nsmeiya wuld tke o CaeaBe a
dixectoryinheasme mypns{ecE ype_mRdir mypreject
Sunta mkdir directaxy nomme

wlhoama?Displaye uses9ap md piuileges fnfermation


he uses who ia cashemtly asad ono Ahe oca Aystem 1
seAihovt paha whonmi oisplays he Cwmend
aomain amd uses name2
Suntaai whaomi

sCat (Shot gov "Concatenade) Command 13 one e he mest


neauently sed Commaacd in Linsvnis Hbe opeafng yste
Cat Commamd allows us to cheaBe single ox_muliple iles
vfew cantain ep 4e concalenate lea and yedi.ect oulpu
teminal or leAn thia ahdicleue
weaheqina do
ind ou hamdy vse s Cat commamds wh heir
ecaapley in Linux
Ssuntaa cet (opion) Aile Aame

AHTtude
Page No
Date_

wc2heuc uarcount)Camoamd o UnteLtous 0enadinq


Aystemab used ta tad ut numkeh s newline eaua wd
cauntayte oond Chahackea esunt fa agile_Apeited J
dhe Angumemts
The Syotax g WC ommamds A Ahauwn belau..
yotax we(opkons Jilenanae

Ophians
>WC Printa the aurmbgs s lines in a les
wcw PMnt tiae nuabes a uaxdp in a 4tle
2C c Pisplays Ahe count et chaathess aama le
wempzini8 Ahe Count o ehakacteky aona ale
w-Linlk anly he leangla dheAae longes Mne io
a ile

Ca Commamd i a ealenadas coosamd n Linus which is


Vsed ta kee dhe caleada e a [peci mandh o e
or a whole ylah.
iuntax Cal LLmonh] eah
Rectomaulah backet maa ogkfanad Ao ued wthau
oplioa win appean acalemdes Caemt mnnth amd yeAn
C a ; 3haws Cuhea matth ealemda on the Lesminal.
cal o 202: `hau Caleaada 1alecked m.dn Amd qeas
Cal 202)AMuus the whaleealemdan e ae yea
Cal 2021 more: Rs yea mau nat beible_in th saane
ACxeemuce a e uth ca usespaceba to Sacellbaadawa
call-3Ahous Calemdas e pxeious Cwhemt aaad
nec month.

Atf tuce
OUTPUTS:
rootgattt-VirtualBOX: /hone/attt
. xt Ptctur
ocument . txt fule
oot@aiit-virtualBox: /home/atit#

rootgalit-virnuainor: /home/elt
rootatit- vir
Lus lBox :/howe/at ttM

test
root@atit-virtualBox: /hone /atits nkdir
oot@aiit -VirtualBox : /hone/aiita ls
Downli file4.txt
ftle2.txt Ptctures Tenplates Vldeo5
file1.txt file3.txt Hustc
root@ai it-VirtualBox: /hone/aiit
Terminal

roetailit-VirtuelBox /heme/eit

hore/ali 1
roatgl
VituaiBo
w r l e 3 , tat
/homs/alit
E
Te jhore jat i i

tualhoxi/honejsttts cal

t 22 23 2425 26 27
29

ot gat st vietealtas: /hove jai it2


PageNo:
Date
Pactfcal
Atm Aduamced Lint Conmonamds

Salutfaa
1Su he su coraonaand A wed ox adicating Ahat he we
a o ust amd has all he pesaissiansk

2ps he ps e . praceA Atatua) Cormaaand ia ed o auide


faaxmadian about theCAAhetly naingPMLRLAeAnclding
heir psce demitecadion Aumbesleps)

3||mi Ihe m ComnoDad e dhe emave direcAa Coma


2 ed to xemeadiectox om he system

mp Tme cnp Commacad uwe fo compafag tua dtera

s.d The d Lo sudor theckinghee space an


the dEsk

oecho i commacad aed or påldjmg- atememt

le alfosihiA Cemmonad Caaa iue alhehnake ene to a comaod


eg alia : 4 -

Luheeia he wheke eammamd ia wed far checking he


locaton e amu patfalas Comnmonds

L 1he ail Commcomd is wwed -gox ofllíng a praced

ArTHudel
Page No
Date

gaepThe gaep Comnamd i uad to Seanch tesct seabches


ert a the gem e or lines Condainfag a match do he
aings ex wsrdi

condiqiAconi Commood A ed or chechinqamd


chang ing 1? addrea

mom mom Commoad i wed par imparmadion abaut


Amy eommamd
Sunta mam ls

Conslucian A Cnvz commaaads helps xead medijy


Concotenate tect 4ile The above Advamce Linua COmmancs
help, cheching proce tat SwiHching use ek.

ArEtude
OUTPUTS:
root@alit-virtualB ox: /home/ailit a

atitaattt-VirtualBox: $ su
oot8alit-virtualBox:
assw /hone/alltw

Activities Terminal Nov 17 09:09

rootgalitvirtualsox /home/alitaE
root@aiit.VirtualBox: /home/aiit# ps
ID TTY TIME CHD
1995 | ts/ 00:00:00 Su
1996 | pts/0 00:00:00 bash
2005 pts/0 00:00:00 ps
oot¢aiit-VirtualBox: /hone/atit#

root@alit-VirtualBox: /home/alit a

root@aiit-virtualBox:/home/atit# ls txt
Tenptates
file1. txt
Tle2.txt file4. Pctures Vtdeo
ts
root@aiit-virtualRov. Ih rm Tile4.txt
ontaai i+ eelE"

ts file1.txt ftle3. txt PtctureS TeaPkoe


root@aiit-virtua lBox: /home/allt

root@alit-virtualBox: /home/aiit a

root@aiit-VirtualBox:/hone/aiit# cmp file1. txt file2. txt


file1.txt file2.txt differ: byte 1, line 1
root@atit-Virtual Box:/home/aiit#

VILTeS

root@aii&-VirtualBox: /home/ait
root@allt-virtualBox : /home/atitz df
Ftlesystem
udev
IK-0 LoCKS
40S852
Used Avallable Uses Mounted on

7Oev
9 20 1332 98588 28 /run
Tmprs
'dev/:
sdas 219412 7304728 1420648 BA%
tmpfs 498588 498588 O % /dev/shm
tmpfs 5120 5116 1% /run/lock
498SB8 498588 Ox /sys/Ts/cgroup
tmpts
d po O100snap/bare/s
/dev p Pcrel8/2246
o 100 POrel8/19
dey/loop3 224256 224256 1804/66
/dev/loop5 66432 66432 o 100% snan 1514
/dev/loop4 224256 224256 0 100% /snap/gnome-3-34-1804/72
/dev/loop7 52352 52352 0 100% /snap/snap store/518
/dev/toopo o6810 06810 0 100x Isnap/gtk-common-thenes/1519
/dev/lLoop8 52224 52224 0 100% /snap/snap store/547
/dev/ loop10 33280 33280
100x snap/snapo/13640
/dev/toop 31872 31872 0 100% /snap/snapd/ 11036
/dev/s 524272 524268 1% /boot/eft
tmpfs 97 16 6 99660 1% /run/user/1000
root@atit-virtualBox: /home/alit#
ities Terminal Nov 17 10:56

root@ait-virtualBox: /home/Jait
root@aiit-virtualBox: /home/aiit# echo "hello world
hello world
root@aiit-VirtualBox : /home/aiits

root@ailit-VvirtualBox: /home/ailit
l="ls
root@allt-virtualBox: /hone/aiit# alias -

rootdatlt-vtrtua
total
lBox: /hone/alltw
nwxxrX at atlt 4096 NOV 10 14:16 oesktop
drwxr- xr-x 2 attt atlt 4096 NoV 10 14:10 DOCUMen
drwxr-xr-x 2 atit atit 4096 Nov 10 14:10 Downloads
rW-- 1 root root B Nov 17 08: 52 file1. txt

- rw-r- -r-. 1 root root 12 Nov 17 a9 A1


drwxr-xr-x 2 aiit aiit 4096 Nov 10 14:10
drwxr-xr-x 2 a t t aiit 096 Nov 10 14:10 Ptcture

drwxr-xr-x 2 alLt attt 4096 Nov 10 14:16 Tenplates


drwxr -xr-X 2 root root 4096 Nov 17 08:57 test
drwxr-xr-x 2 atit atit 4096 Nov 10 14:10 Videos
root(gallt-virtualBOx : /hone/alith

root@aiit-virtualBox: /hone/aiit# whereis ls


ls: /usr/bin/ls /usr/share/nan/ man1/ls. 1.92
root@aiit-VirtualBox: /hone/aiit#

ailit@alit-virtualBox: -

0ot@atit-VirtualB0x : /home/atlt# ps

ots/0
1408 pts/0 08:0
00: 00:00 bash
1701 pts/0 00:00:00 ps
oot0atit-virtualBOx:/home/atit# ktll 1408
oot(gaiit-virtualBox: /home/aiit# kill 1407

Session terninated, killing shell. . . root @aiit-virtual Box :/hone/ai it# .killed

Termina
LLtgatL-VLtddtBoX**9

root@alit-virtualBox /home/ait
rooteaiit-virtualBox: /hone/aiit# grep this filez. txt
thi is file2.txt
rootatit-virtualBox: /hone/aiit#

root@elit-VirtuelBox /home/elit a

oot@atit-VirtualBox : /hone/allta tfconftg


enpos3 : rlags-4163eUP, BROADCAS T,RUNNING, ULTICAST u 1500
inet 18.8.2.15 netnask 255.255.255.0
Lneto fe80: :09fc:2128:aefe: 9828
broadcastscopetd
prerlxlen 64
18.8.2.255
ox20c ltnk>

RX packets 1130 bytes 1183968 (1.1 MB)

RX errors dropPped
TXpackets 778
overruns ane
bytes 84a57 (84.4RB)
TX errors0 dropped 8 carrter o
0 overruns coll1stons
Lo: flags-7leUP.L00ACK RUNNN tu o10
net 0.0.1ne tnas 300.0 chos
neto
RX packets 263 bytes 22054 ( 2 2 . 6 K8)

X errors o dropped o O v e u n s e

packets 263Oppeo
bytes 2205* . 5
o overruns 0
Car rter 0 coltlslons 0
Co
rootgaiit- virtualBox: /hone/aiit#
root@alit-VirtualBox: /home/ait
root@aiitVirtualBox: /home/aiit# man ls

root@alit-VirtualBox: /home/aiit aE
LS(1) User corimands LS(1)

NAME
ls list directory contents

SYNOPS
1s [OPTION].. .

[EILE]...
DESCRIPTION
List information about the FILES (the current directory by default) .
entries if none of -cftuvsUX nor --sort is speci-
Sort
fied.
alphabet ically
Mandatory argunents to long options are mandatory for short options
too.

-a, -- ll
do not tgnore entries starting wt th
-A, -almost-all
do not list implied . and

- author

with - , print the author of each file

-b, -escape
print C-style escapes for nongraphic characters

Manual page ls(1) lUne 1 (press h for help or g to quit)_


Page No
Date
Pracical5
Aim \oxbiog uth V Edita

Solulfon
Totmduchion
The V edito ia the moat populag amd claic tect edtr
in the Linux 4arail Belgu ase sanme reona whích make-
a widely use Lditax
Aaauailable in almost el tinus Distaibudfon
4 worea alang he 20omeacbeoss dijesemt platama
Ditibwliana.

An npaaued vexsfan viedttex f caluad vim.


ov Cam use he i_editor fo edit om efsliaq e_
4o Caeae a oe le Aom sbrakch..
You Cam also vsehe editax to ivs reada
adesct 4ilee

Operalion Mades
wo_mode
1 Commaad Made oThi mode emaelep you to penon
acnainialrative taahs use Auch as àaving the ea, eacecutins
the Comma.cucdssvfns e csar ysnain) amd pasting-
he lines o worda as wel od 4indingand eplacinq
| T h i onadeuhaBeves yov ype t ftepreted
Commaond

|2 Lncend Made oThi mocee emable uev to Ingey etfalo

he te fveuthing ha ped in Ahi made katexmeted


inpt omd placed tn the e.
YeAuhn the Commomd mode amd AQve h e homg ea u o u have
o To
o preja £sc ke4

Siynax
ilenamg NEJ> ox L4ilename ExsriN
youpeci on cigkagile them the edior wald ope it
to you o editlse yau Cam Cxeate

example
vi-test

vf Edtting Commands

Ke Combinationa Funcfonss
nset at Cunsax go@)nto inse mode
Wte alte cuhoy gees tato focest oacdle
wite a the emd e ne (goes fno nsetoode)
SC Tehminate ingest made
Undolast chamge..
Undo a chamgeb to Ahe endire line
Inset a blone liae below the uhem line hen stot
O Insext a blama llne obore 4he_cwnent line hen tatt iaset omo
dd Delete line
3dd Delete 3lines
Delete Lonteats line ates Ahe eubsox amd inscat ne he
D Delete Conhes o line ate he CAuso
d Delete word.
Ldu Delele u wood
Chamg Dvd:
Delete CumseY at the chanactes
X Blambspace.
Replace chahacAeA.
OuehwdLe chahackens omehsay oowosro.
S Aubstkute one choaaades ndeh cwnsox Continue o inset
S bubstitute emdire line amd bagto to Insent at Aa baginnng s
Chamge CAse o indiutdual_chshaches

Maing wtbia aEile


Rey Combinatioo FuncHans
Moe the Cuusor to the Ael4 ona -claanacten posfon
MoveA he chsar do he g one-chana ten posifian.
Movg he esox up one ine
Maves the cwnser elaun ane line.

Capy nd ase
ReyCambinalfaa Eunckions
Y Copies h cumeat line-
Copfes he Cubhet ward om dhe chosactes Me
JOwes-Case wussor o n undil tae emd dhsws
P Pla he Copied teoct akter the cush
P Pua the tamked teoct kehore the csor

SAing ad closins he le
ley Combinakon funcHons
Shit zz >Save Ahe 4le md ouite
:w Savet h e ile but keep i opem.
QulQult withou Soaving
Qut ced
wa Soue theie amd 9it
close all le
OUTPUTS:
root@aiit-virtualB8ox: /home /aiit# touch pracs
root@attt-VirtualBox: /hone/atit# vi pracs
root@aiit-Virtualßox : /hone/aiit# chrnod +x pracs
root@aiit-VirtualBox: /home/aiit# /pracs
welcone
PID TTY TIME CMD
1423 pts/0 00:00:00 su
00:00:00 bash
1424 pts/0
2032 pts/0 00:00:00 bash
2033 pts/0 00:00:00 ps practicals test
Desktop tlel.txt MusiC
Documents file2.txt Pictures Public Videos
Downloads file3. txt pracs Tenplates
1K-blocks Used Available Usex Mounted on
Filesystem 465852 465852 0 % /dev
udev
tmpfs 99720 1 3 3 6 98384 2% /run
/dev/sda5 9219412 7558144 1173232 87%
498588 498588 0% /dev/shn
tmpts
tmpfs S120 4 5116 1% /run/lock
tmpfs 498588 498588
0%/sys/fs/cgroup
/dev/loopo 128 128 O100% /snap/bare/5
/dev/loop1 S6832 S6832
100% /snap/core18/2246
224256 224256 0 100%/snap/gnome-3-34-1804/72
Idev/loop2 66432 66432 0 100% /snap/gtk-connon- themes/1514
/dev/loop5
/dev/loop3 224256 224256 100% /snap/gnome-3-34-1804/66
0 100%/snap/gtk-comnon-themes/1519
/dev/loop4 66816
S6832
66816
S6832 0 100% /snap/core18/1988
/dev/loop6
Tdev/loop8 52352 52352 O100% /snap/snap-store/518
0 100%/snap/snapd/11036
/dev/loop7 31872
52224
31872
s2224 o 100% /snap/snap-store/547
/dev/loop9
33280
/dev/loop10 33280
524272 524268
100%snap/snapd/13640
1% /boot/eft
/dev/sda2
tmpfs 99716 60 99656 1% /run/user/1000
complete
root@aiit-virtualBox: /hone/aiit#

echo "welcome"
ps
mkdir practicals
ls
df
echo "complete"
Pracdica-10
Aimhetina P addaes amd caanecting o intenaek.

heorgtcank intesface_Configux.aian) Sommcomd used do Canbigure-


dhe hahnel-esidlem newo nterdpaca1 A ued at hebog
Hne o setup he fotengaces as necessahy Age Ahot
neec
VSuallyused whem needed -during delugiag oLwhem yau
ugtea tunfng Also, he Commomd 11 used t aulgnAhe P.
9ddreu and netomasla t am intefae m to enable or diáable
a gieenindenta.
Use contia o display he nloxmatian netuosh_intenpaces

Use iaonq erp0s3 10.0.2.1 o chonge Hhe W addoes


(Sndox {conla intefae name fp addrea)-

ha Chech uhetne P address changed qr na again-


ype iconia
OUTPUT:
root@aiit-VirtualBox : /home/aiit# ifconfig
ntu 1500
enpos3: flags=4163<UP, BROADCAST, RUNNING, MULTICAST>
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
ineto feBO: :a9fc:2f28: aefe:9a28 prefixlen 64 Scopeid ox20<link>

ether 08:00:27: 4d:09 : 55 txqueuelen 1000 (Ethernet)


RX
RX
packets 2420 bytes
errors 0 dropped 0
3356148
overruns 0
(3.3 MB)
frame o
TX packets 989 bytes 88820 (88.8 KB)
TX errors o dropped o overruns 0 carrier 0 collisions o

lo: flags=73<UP,LOOPBACK, RUNNING> mtu 65536


inet 127.0.0.1 netmask 255.0.0.0
inetó :1 scopeid ox10<host»
preftx len 128(Local
loop txqueuelen 1000 Loopback)
RX packets 170 bytes 14594 (14.5 KB)frane
RX errors 0 dropped o overruns 0 0
TX packets 170 bytes 14594 (14.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions o

root@aiit-VirtualBox: /home/aiit#

root@aiit-VirtualBox: /hone/aiit# ifconfig enpos3 192.168.0.30


root@aiit-virtualBox:/home/aiit# ifconfig
enpos3: flags=4163<UP, BROADCAST,RUNNING,MULTICAST>ntu 1500
inet 192.168.0.30 netmask 255.255.255.0 broadcast 192.168.0.255
inetó fe80: :a9fc:2f28: aefe : 9a28 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:4d:09:55 txqueuelen 1000 (Ethernet)
RX packets 2444 bytes 3368406 (3.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1029 bytes 93603 (93.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP, LOOPBACK, RUNNING ntu 65536


inet 127.0.0.1 netmask 255.0.0.0
inetó ::1 prefixlen 128 scopeid ox10<host»
loop txqueue len 1000 (Local Loopback)
RX packets 181 bytes 15595 (15.5 KB)
RX errors 0 dropped o overruns o frame o
TX packets 181 bytes 15595 (15.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions o

root@aiit-virtualBox: /home/aiit#

You might also like