You are on page 1of 35

NAME:ABHAYSONTAKKE

BATCH:6 GROUP:2

ROLLNO–71

REGI
D:201050050

amsont
akke_b20@t
x.vj
ti
.ac.
in

COMPUTERPROGRAMMI
NGLAB
JOURNEL
EXPNO1:STUDYVARI
OUSLI
NUX
COMMANDS
EXPERI
MENTNO1

AI
M :STUDY VARI
OUS LI
NUX COMMANDS

THEORY:

LI
NUX:

LI
NUX isanoper ati
ngsystem'
skernel
.Youmi ghthave
heardofUNI X.Wel l
,LinuxisaUNIXclone.Buti
twasact uall
y
createdbyLinusTor valdsfr
om Scrat
ch.Li
nuxisfr
eeandopen
-source,t
hatmeanst hatyoucansimplychangeanythingin
Linuxandredistri
buteitinyourownname!Therear eseveral
LinuxDist
ri
butions,commonl ycall
ed“di
str
os”

Ubunt
uLi
nux

RedHatEnt
erpr
iseLi
nux

Li
nuxMi
nt

Debi
an
Fedor
a

LinuxisMai nlyusedinservers.About90% oft heinternetis


power edbyLi nuxservers.ThisisbecauseLinuxisfast,secure,
andf ree!Themai nproblem ofusingWi ndowsser versare
theircost.Thisi
ssolvedbyusi ngLinuxservers.TheOSt hat
runsinabout80% oft hesmar tphonesinthewor l
d,Andr oid,i
s
alsomadef rom theLi
nuxker nel.Mostofthevirusesinthe
wor l
dr unonWi ndows,butnotonLi nux!

Li
nuxShel
lor“
Termi
nal

So,basicall
y,ashelli
sapr ogram t
hatreceivescommands
from t
heuserandgi vesittotheOSt opr ocess,andi
tshows
t
heout put.Linux'
sshelli
sit
smai npart.I
tsdistr
oscomeinGUI
(graphi
caluserinter
face).)
,butbasicall
y,Li
nuxhasaCLI
(commandl i
neinter
face).
Toopent
het
ermi
nal
,pr
essCt
rl
+Al
t+Ti
nUbunt
u,orpr
essAl
t+F2,t
ype
i
ngnome-
ter
minal
,andpr
essent
er.I
nRaspber
ryPi
,typei
nlxt
ermi
nal
.
Ther
eisal
soaGUIwayoft
aki
ngi
t,butt
hisi
sbet
ter
!

Li
nuxCommands
Li
nuxcommandsar
etheessenceoft
heent
ir
eGNU/
Linuxoper
ati
ng
syst
em usedt
oadmi
nist
ert
heent
ir
esyst
em.Youmaynotknowi
t,but
mostoft
heappl
i
cat
ionsyour
unwi
thi
nthegr
aphi
cal
useri
nter
facear
e
execut
ingLi
nuxcommandsf
oryoui
nthebackgr
oundt
oaccompl
i
sh
t
hegi
vent
ask.

Let
ti
ngt
heappl
i
cat
iont
orunLi
nuxcommandsaut
omat
ical
l
yforus
hasmanyobvi
ousbenef
it
s.However
,thedi
sadvant
agei
sthati
n
manycaseswear
eunabl
etocust
omi
set
hecommandexecut
iont
o
cr
afti
ttowar
dst
hedesi
redr
esul
t.Fur
ther
mor
e,i
fsomet
hinggoes
wr
ong,t
heuseri
smostl
i
kel
ylef
tint
hedar
kwi
thoutanyhi
ntonhow
t
oevenbegi
ntot
roubl
eshoott
hei
ssue.

1.
pwd–Whenyouf
ir
stopent
het
ermi
nal
,youar
eint
hehome
di
rect
oryofyouruser
.Toknowwhi
chdi
rect
oryyouar
ein,youcan
uset
he“
pwd”command.I
tgi
vesust
heabsol
utepat
h,whi
chmeans
t
hepat
hthatst
art
sfr
om t
her
oot
.Ther
ooti
sthebaseoft
heLi
nuxf
il
e
syst
em.I
tisdenot
edbyaf
orwar
dsl
ash(/)
.Theuserdi
rect
oryi
s
usual
l
ysomet
hingl
i
ke“
/home/
user
name”
.
2.
ls–Usethe“ls”commandtoknowwhatfilesareinthedirectory
youar
ein.Youcanseeal
lthehi
ddenf
il
esbyusi
ngt
hecommand“
ls-
a”
.

3.
cd–Usethe“cd”commandtogotoadi
rect
ory.Forexampl
e,i
f
youar
eint
hehomef
older
,andyouwantt
ogot
othedownl
oadsf
older
,
t
henyoucant
ypei
n“cdDownl
oads”
.Remember
,thi
scommandi
s
casesensi
ti
ve,andyouhavet
otypei
nthenameoft
hef
olderexact
ly
asi
tis.Butt
her
eisapr
obl
em wi
tht
hesecommands.I
magi
neyou
haveaf
oldernamed“
Appl
ePi
”.I
nthi
scase,whenyout
ypei
n“cd
Appl
ePi
”,t
heshel
lwi
l
ltaket
hesecondar
gumenti
sthecommandas
adi
ff
erentone,soyouwi
l
lgetaner
rorsayi
ngt
hatt
hedi
rect
orydoes
notexi
st.

Her
eyoucanuseabackwar
dsl
ash.Thati
s,youcanuse“
cdAppl
e\Pi

i
nthi
scase.Togobackf
rom af
oldert
othef
olderbef
oret
hat
,you
cant
ype“
cd.
.”
.Thet
wodot
srepr
esentback.

4.
mkdi
randr
mdi
r–Usethemkdircommandwhenyou
needt
ocr
eat
eaf
olderoradi
rect
ory.Forexampl
e,i
fyouwantt
o
makeadi
rect
orycal
l
ed“
DIY”
,thenyoucant
ype“
mkdi
rDI
Y”.Use
r
mdi
rtodel
eteadi
rect
ory.Butr
mdi
rcanonl
ybeusedt
odel
etean
empt
ydi
rect
ory.

5.
rm –Usetherm commandtodel
etef
il
esanddi
rect
ori
es.Use“
rm
–r
”todel
etej
ustt
hedi
rect
ory.I
tdel
etesbot
hthef
older
sandt
hef
il
es
i
tcont
ainswhenusi
ngonl
yther
m command.

6.
touch–Thetouchcommandisusedtocreateafile.Itcanbe
anyt
hing.Fr
om anempt
ytxtf
il
etoanempt
yzi
pfi
l
e.Forexampl
e,

touchnew.
txt
”.

7.
man&-
-hel
p–Toknowmoreaboutacommandandhowt
o
usei
t,uset
hemancommand.I
tshowst
hemanual
pagesoft
he
command.

8.
cp–Usethecpcommandtocopyfilesthroughthe command
l
i
ne.I
ttakest
woar
gument
s:Thef
ir
sti
sthel
ocat
ionoft
hef
il
etobe
copi
ed,t
hesecondi
swher
etocopy.

9.
mv–Usethemvcommandtomovefi
l
est
hrought
hecommand
l
i
ne.Wecanal
souset
hemvcommandt
orenameaf
il
e.Forexampl
e,
i
fwewantt
orenamet
hef
il
e“t
ext
”to“
new”
,wecanuse“
mvt
extnew”
.
I
ttakest
woar
gument
s,j
ustl
i
ket
hecpcommand.

10.
locat
e–Thelocatecommandisusedtolocateafileina
Li
nuxsyst
em,j
ustl
i
ket
hesear
chcommandi
nWi
ndows.Thi
s
commandi
susef
ulwhenyoudon’
tknowwher
eaf
il
eissavedort
he
act
ual
nameoft
hef
il
e.Usi
ngt
he-
iar
gumentwi
tht
hecommand
hel
pst
oignor
ethecase(
itdoesn’
tmat
teri
fiti
supper
caseor
l
ower
case)
.
11.
echo–The“echo”commandhel
psusmovesomedat
a,usual
l
y
t
exti
ntoaf
il
e.Forexampl
e,i
fyouwantt
ocr
eat
eanewt
extf
il
eoradd
t
oanal
readymadet
extf
il
e,youj
ustneedt
otypei
n,“
echohel
l
owor
ld
>>new.
txt
”.Thecommandpr
int
s(echoes)ast
ri
ngoft
extt
othe
t
ermi
nal
window.

12.
cat–Usethecatcommandtodi
spl
ayt
hecont
ent
sofaf
il
e.I
tis
usual
l
yusedt
oeasi
l
yvi
ewpr
ogr
ams.

13.
sudo–AwidelyusedcommandintheLinuxcommandline,
sudost
andsf
or“
Super
UserDo”
.So,i
fyouwantanycommandt
obe
donewi
thadmi
nist
rat
iveorr
ootpr
ivi
l
eges,youcanuset
hesudo
command.

14.
exi
t–Theexitcommandwillcloseaterminalwindow,endthe
execut
ionofashel
lscr
ipt
,orl
ogyououtofanSHHr
emot
eaccess
sessi
on.

15.
chmod–Usechmodtomakeafileexecutableandto
changet
heper
missi
onsgr
ant
edt
oiti
nLi
nux.

16.
clear–Usetheclearcommandtocleartheterminalifit
get
sfi
l
ledupwi
tht
oomanycommands.
Concl
usi
on:Var
iouscommandi
nLi
nux
OShavebeenst
udi
edsuccessf
ull
y.
`
b
d
f
h
l

Ž
š
 
¡
¿
è
ê
ì
í
ï
ù
ü
;
–QS¬!
"„»ï
ðö÷øcúcûEF[
`}~ە
ð¯
"ß6¬7¬9¬:
¬o#½$1
QuTu]
u~u€uuŸuÓuäuvÈvØvåvðv÷vwLzè9HHHHHHHH
l
HmH€HH$Œ HüHØI
ÙIÂJ,
KoKK(
”KØK¯L(
(NÅNðN(
O
P
PqPr
PsPxPyPzP‘
Q“Q”
Q¨R$®R³
U´U»VÀVÃV6W7WÀ$r
À(sÀ<Á=Á¸
ÁŽÃ›
ÃÅÆ
õÆ0
¯
"ß6¬7¬9¬:
¬o#½$Lz,
KoK¯L

You might also like