Fayiloli da Gudanarwa
-
ls
: Lissafin fayiloli da kundayen adireshi a cikin kundin adireshi na yanzu. Yana nuna sunayen fayiloli da kundayen adireshi da ke cikin kundin adireshi na yanzu.Misali:
ls
-
pwd
: Buga cikakken hanyar kundin adireshi na yanzu. Yana taimaka muku sanin inda kuke a cikin tsarin fayil.Misali:
pwd
-
cd <directory>
: Canja zuwa ƙayyadadden kundin adireshi. Ta amfani da wannan umarni, zaku iya kewaya tsakanin kundayen adireshi a cikin tsarin fayil ɗin ku.Misali:
cd /home/user/documents
-
touch <filename>
: Ƙirƙiri sabon fayil ko sabunta lokacin gyara fayil ɗin da ke akwai. Idan fayil ɗin ya riga ya wanzu, zai sabunta lokacin gyarawa.Misali:
touch newfile.txt
-
cp <source> <destination>
: Kwafi fayil ko kundin adireshi daga wurin tushe zuwa wurin da aka nufa. Kuna iya kwafin fayiloli ko kundayen adireshi da yawa ta hanyar tantance tushe da yawa.Misali:
cp file.txt /home/user/documents/
(kwafi fayil)cp -r folder1 /home/user/documents/
(kwafi directory)
-
mv <source> <destination>
: Matsar ko sake suna fayil ko directory daga wurin tushe zuwa wurin da aka nufa. Idan wurin sabon suna ne, zai sake suna; idan sabuwar hanya ce, za ta motsa.Misali:
mv file.txt /home/user/documents/file_new.txt
(sake suna fayil)mv folder1 /home/user/documents/
(matsar da directory)
-
rm <file>
: Cire fayil. Lura cewa wannan umarni zai share fayil ɗin ba tare da wani tabbaci ba, don haka yi amfani da shi a hankali.Misali:
rm file.txt
-
mkdir <directory>
: Ƙirƙiri sabon kundin adireshi tare da ƙayyadadden suna.Misali:
mkdir new_folder
-
rmdir <directory>
: Cire kundin shugabanci mara komai. Lura cewa kawai za ku iya cire kundin adireshi mara komai ta amfani da wannan umarni.Misali:
rmdir empty_folder
Gudanar da Izinin Fayil da Darakta
-
chmod <permissions> <file/directory>
: Canja izinin shiga fayil ko kundin adireshi bisa ga takamaiman izini. Izinin gama gari sun haɗa da "r"(karanta), "w"(rubuta), da "x"(aiwatarwa).Misali:
chmod u+rwx file.txt
(ƙara karantawa, rubuta, aiwatar da izini ga mai shi) -
chown <user>:<group> <file/directory>
: Canja mai fayil ko kundin adireshi zuwa takamaiman mai amfani da rukuni.Misali:
chown user1:group1 file.txt
(saita mai shi da rukuni don file.txt)
Tsari da Gudanar da Sabis
-
ps
: Lissafin tafiyar matakai. Wannan umarnin yana nuna jerin matakai da kuma ID ɗin Tsari masu dacewa(PID).Misali:
ps
-
top
: Nuna tafiyar matakai da albarkatun tsarin. Wannan umarnin yana ba da hanyar haɗin gwiwa don duba ayyukan tafiyarwa da saka idanu albarkatun tsarin kamar CPU, RAM.Misali:
top
-
kill <PID>
: Kashe tsarin tare da ƙayyadadden ID na tsari(PID). Wannan umarnin yana aika sigina don dakatar da aikin, yana ba shi damar fita ko rufewa.Misali:
kill 1234
(kashe aikin tare da PID 1234) -
systemctl start <service>
: Fara takamaiman sabis. Sabis shiri ne da ke gudana a bayan tsarin, kuma wannan umarni yana farawa da shi.Misali:
systemctl start httpd
(fara sabis na Apache) -
systemctl stop <service>
: Dakatar da takamaiman sabis. Wannan umarnin yana dakatar da sabis ɗin da ke gudana.Misali:
systemctl stop httpd
(dakatar da sabis na Apache) -
systemctl restart <service>
: Sake kunna takamaiman sabis ɗin. Wannan umarnin yana tsayawa kuma yana farawa sabis.Misali:
systemctl restart httpd
(sake kunna sabis na Apache) -
systemctl status <service>
: Nuna matsayin takamaiman sabis ɗin. Wannan umarni yana nuna ko sabis ɗin yana gudana ko a'a, da matsayinsa.Misali:
systemctl status httpd
(nuna matsayin sabis na Apache)
Gudanar da Kunshin
-
yum install <package>
: Shigar da kunshin software daga CentOS ma'ajiyar.Misali:
yum install nginx
(shigar da Nginx) -
yum update <package>
: Sabunta kunshin software da aka shigar zuwa sabon sigar.Misali:
yum update nginx
(sabuntawa Nginx) -
yum remove <package>
: Cire kunshin da aka shigar daga tsarin.Misali:
yum remove nginx
(cire Nginx)
Gudanar da hanyar sadarwa
-
ifconfig
: Nuna bayanai game da na'urorin cibiyar sadarwa da adiresoshin IP na tsarin.Misali:
ifconfig
-
ip addr
: Nuna bayanai game da na'urorin cibiyar sadarwa da adiresoshin IP na tsarin. Wannan umarni yayi kama daifconfig
.Misali:
ip addr
-
ping <hostname/IP>
: Bincika haɗin yanar gizo zuwa ƙayyadadden adireshin IP ko sunan yanki ta hanyar aika fakiti da jiran amsa.Misali:
ping google.com
-
curl <URL>
: Dauke abun ciki daga URL. Ana amfani da wannan umarni sau da yawa don zazzage bayanai daga gidajen yanar gizo da nuna sakamakon akan layin umarni.Misali:
curl https://www.example.com
Gudanar da Tarihin Umurni
-
history
: Nuna tarihin umarnin da aka aiwatar a baya. Wannan umarnin yana lissafin umarnin da aka aiwatar a zaman na yanzu.Misali:
history
Waɗannan wasu umarni ne na gama-gari kuma masu fa'ida a cikin CentOS. Dangane da buƙatun ku da manufofin ku, zaku iya amfani da waɗannan umarni don sarrafa tsarin ku da aiwatar da ayyuka na asali.