You are on page 1of 13

BASIC LINUX CoMMANDS

COMMAND DESCRIRTION
Io open tesminal
di/Ls Shows all iley and Foldexs
ls list vieso ottiles a foldevs
useg naua) ot dl| available cornmnds
esc Quit witkout Savi n1
Save, a d Qut
mkdis(hae)
to get back to the 'tolder
rwious
Shons Pesert working diret
diveet
Content ot te Specitied
Cot<ile ameetension name Shos eset
Copies Dne ile to othe spe iti
CP< Filernanne>destnatio> destiosh'on
Sudo -to rnove t Totsuper uss da)
Tm<filename

whoami
Dmove a
to
e to one
diredoy
ghos the Vein t the og
Cat /etc/*selease
Sdo apt iosellgce Compilkr
0veto nest

to enit m any mnde


esc
to mbeto nert ine invietitor
D6LeRiPTIDN
vi<Hlenareetonsion to open aile irnvi editor
to insrt a blance space
to relace qny eaea
delete
del deletR chara t e one by one

Shitt t inert Pase


ASsiNN CNT -2.

tinVoiddudeKstmain)dio
Pinte( Enter Cit nunberi,

SCane("%A"a)', nun ber");

SCanf(u%,
Surn atb, 2);
)

Etr Se cond yubes


The 15

2. Wi ntal nymbers in VI

Fcdeitb h
void mail)
(nt n, ,umo;
Pintt Entr the value

Sumyymti
Chee weth a nvber is
Rime not in ito

Fincludcstti h
int main)
Pintt "Fater the numbex,")

pinte (" Not ine"),


forli, icen 'yit+
Pantf(uNotime)

rtn0
°Et the nunber:
ead
R
only
lenme.entns
2 n utchnd
Peimini
on)
lnereetension 000 chnd
aphabetiey Hle list
a - \s
mode a
ile change chrnod
Commnds,
ther
enfenion Hlenarne
other
etecute
Read
Mode
Code, echo
\Aleleormeto cREe
outut Wellome to BcRFC

Code? echo" nter u narne

touo ate you nane",


sed ine
absolytely Fin
othut : Entes your nime
ine
in.

Code, echo ll Ents i t


Nrabes

e i (ta+ b))

Ou thutEnts st bes
Eot Seond nuuber

The l2
ode. echo" Ente

hen
elge Eigiblernting
Not
Eigible
outhut Enttx

Code
Eugblervoting
The sene is:"

ei"

whil Csi -ge


echoti
2
sait YKoKAM
shellscibt t i n t a table of number.
Lder echo'Eer a nurnbe*
nutnbes:"
Tead

LahileCsi-elo}
do
ses 4(ear

done
uth ut Ents a nnbes: &

5 2^ |S

S*S25

shellsabt to ent names


Code echo entes

ase.
Duthut: Entes
Ashil
narnes, $$nameC-1,4name C1?
Nanedsa
The
Ashisu
Nasesdre
ite a shl s e t t
vaiable: enter marne ittt ead
ech" Noe

Ccho"eREPLY"
out ut Name,Ashish
Ashih
4 ie a selict to pass Pararnet in commend
line
de; echol
Code

echoz
echo3
echo4
Duttput Welcone
To

We lcooe To BcREc.

ite a shelset to inbt usuiesname 05d passwos4

as the -that you Passd. Cannt be


She ahe tyte it.
usesarme Od aSSwT!

Sead UseorneU

VSernarne is"Ru"Passd is;"


and Pashord
Ashis
is, Ashsl
Passoi is; 9yoo
chellset Gannad to lose a Color Ted, green telley
trom sto o
and sw the int tn ng
echo" Ete Colos:

then

thenecho
qreen" -o fehreen-o $Colo GREEN
then

elee
els 'ahut'

Eater Cols
atut rce
0
74and betwen isnasleA
Ghrade Enter tut: Ou
is
echo
16" be tosks
19". and betoe)
o martey
is echs"
io0." and beboeen
qo masks
is )echo
$grdde
in Case
rade Enter eeho Cod
A40-od
the to aite
tte rade ester
a shellsenit
to
AssiGNMENT-S
2. ite
number
shellseribt to eat
viny ntl.
Code: i=|
unilCsi
letitt
done

|2

30

6o

3. Wit shellsest to t t 2 eleent are


not
Code: a Ashis
b ASHTSH

-then
echo
Ais equalto g"
e lse
Not eual
i

output: tot equal


to ehek heer a

oe
it test-Z a
then

lie
echo" ating is not embty

outut' Stsiy is

You might also like