Ubuntu Command Line: Dokokin gama gari da Jagorar Amfani

Fayiloli da Gudanarwa

  1. ls: Nuna jerin fayiloli da kundayen adireshi a cikin kundin adireshi na yanzu. Wannan umarnin yana ba ku damar duba abubuwan da ke cikin kundin adireshi na yanzu.

    Misali: ls

  2. pwd: Buga cikakkiyar hanyar jagorar yanzu. Wannan umarnin yana taimaka muku sanin inda kuke a cikin tsarin fayil.

    Misali: pwd

  3. 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

  4. touch <file>: Ƙ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

  5. 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)
  6. 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)
  7. rm <file>: Share 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

  8. mkdir <directory>: Ƙirƙiri sabon kundin adireshi tare da ƙayyadadden suna.

    Misali: mkdir new_folder

  9. rmdir <directory>: Share kundire mara komai. Lura cewa za ku iya share kundire mara komai kawai tare da wannan umarni.

    Misali: rmdir empty_folder

Gudanar da izini

  1. chmod <permission> <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, da aiwatar da izini ga mai amfani)

  2. chown <user>:<group> <file/directory>: Canja mai fayil ko kundin adireshi zuwa takamaiman mai amfani da rukuni.

    Misali: chown user1:group1 file.txt(saitin mai shi da rukuni don file.txt)

Tsari da Gudanar da Sabis

  1. ps: Lissafin tafiyar matakai. Wannan umarnin yana nuna jerin matakai da kuma ID ɗin Tsari masu dacewa(PIDs).

    Misali: ps

  2. 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

  3. kill <PID>: Kashe tsari 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)

  4. systemctl start <service>: Fara takamaiman sabis. Sabis shine tsarin baya na tsarin, kuma wannan umarni yana farawa da shi.

    Misali: systemctl start apache2(fara sabis na Apache)

  5. systemctl stop <service>: Dakatar da takamaiman sabis. Wannan umarnin yana dakatar da sabis ɗin da ke gudana.

    Misali: systemctl stop apache2(dakatar da sabis na Apache)

  6. systemctl restart <service>: Sake kunna takamaiman sabis ɗin. Wannan umarnin yana tsayawa sannan yana farawa sabis.

    Misali: systemctl restart apache2(sake kunna sabis na Apache)

  7. systemctl status <service>: Nuna matsayin takamaiman sabis ɗin. Wannan umarnin yana nuna ko sabis ɗin yana gudana ko a'a da matsayinsa.

    Misali: systemctl status apache2(nuna matsayin sabis na Apache)

Gudanar da Kunshin

  1. apt-get install <package>: Shigar da kunshin software daga Ubuntu ma'ajiyar.

    Misali: apt-get install nginx(shigar da Nginx)

  2. apt-get update: Sabunta bayanin duk fakitin software daga ma'ajiya. Wannan umarnin zai debo bayanai game da sabbin fakiti daga ma'ajiyar.

    Misali: apt-get update

  3. apt-get upgrade: Haɓaka duk fakitin da aka shigar zuwa sabon sigar.

    Misali: apt-get upgrade

  4. apt-get remove <package>: Cire kunshin da aka shigar daga tsarin.

    Misali: apt-get remove nginx(cire Nginx)

Gudanar da hanyar sadarwa

  1. ifconfig: Nuna bayanai game da na'urorin cibiyar sadarwa da adiresoshin IP na tsarin.

    Misali: ifconfig

  2. ip addr: Nuna bayanai game da na'urorin cibiyar sadarwa da adiresoshin IP na tsarin. Wannan umarni yayi kama da ifconfig.

    Misali: ip addr

  3. ping <domain/IP>: Bincika haɗin yanar gizo zuwa ƙayyadadden adireshin IP ko sunan yanki ta hanyar aika fakiti da jiran amsa.

    Misali: ping google.com

  4. curl <URL>: Mai da abun ciki daga URL. Ana yawan amfani da wannan umarni don zazzage bayanai daga gidan yanar gizon da nuna sakamakon akan layin umarni.

    Misali: curl https://www.example.com

Gudanar da Tarihin Umurni

  1. 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 amfani a cikin Ubuntu. Dangane da buƙatun ku da manufofin ku, zaku iya amfani da waɗannan umarni don sarrafa tsarin ku da aiwatar da ayyuka na yau da kullun.