Kamar yadda aka sani a duk duniya, layin umarni yana ba mu ƙarfi mai ƙarfi a cikin tsarin Ubuntu ɗinmu. Wannan yana ba mu kayan aiki da yawa ko ƙari don aiki tare da tsarin aikinmu fiye da yanayin zane. A cikin wannan labarin zamu ga wasu daga waɗannan kayan aikin. Za su kasance ɗaya daga cikin mahimman mahimmanci, ko kuma aƙalla mai ban sha'awa wanda zamu iya duba bayanai na tsarin aikinmu, kashe ayyukan budewa ko shirye-shirye.
Wannan jerin umarnin da za'a iya karawa akan wanda abokin aiki ya nuna mana a zamaninsa inda yayi bayanin cewa sune aiwatarwa a cikin Gnu / Linux da yadda ake sarrafa su. Tare da umarnin da zan nuna a ƙasa, zamu sami damar samun ƙarin bayani da faɗaɗa zaɓuɓɓukan da yawancin masu amfani suke amfani da shi. Waɗannan ba duk abin ke wanzu ba, don haka idan wani ya san wani umarni mai alaƙa, kada ku yi jinkirin barin shi a cikin maganganun.
Kashe matakai daga tashar:
kashe da killall
Kashe ɗayan umarni ne wanda yakamata kowa ya sani. Ana amfani dashi kashe matakai. Dole ne ayi amfani dashi ta hanyar PID wanda zai gano aikin zuwa tashar. Idan lokacin ƙaddamar umarni ya faɗi, za mu iya ƙara sigina na 9 zuwa gare shi don haɓaka damar cin nasara.
Kill -9 12838
Ta hanyar tsoho kashe amfani da sigina 15, wanda ake kira SIGTERM. Da sigina na 9 shine SIGKILL. Wannan siginar karshe zata gaza ne yayin da wani tsari yake gabatar da kwaya. Idan irin wannan yanayin ya faru, aikin zai ƙare bayan yin tsarin kira.
Zamu iya ganin cikakken jerin sakonnin da zamu iya amfani dasu tare da wannan umarnin ta hanyar rubuta kashe -l.
Tare da umarnin killall zamu iya kashe matakai da suna. Idan Firefox (alal misali) ya faɗi, zamu iya amfani da misali mai zuwa don rufe aikace-aikacen.
Killall firefox
kashe
Wani lokacin bamu san ainihin sunan aikace-aikace ba. A wannan yanayin, zaku iya ɗaukar a karin hoto kashe matakai. Buga xkill a cikin tashar zai juya siginan sigar zuwa X. To, ta danna kan taga da ba ta amsa ba, umarnin zai rufe ta.
pkill
Kamar umarnin kisa da killall, ana amfani da pkill don aika sigina. Umurnin pkill yana baka damar amfani maganganun yau da kullun da sauran ka'idojin zabi. Bincika tsakanin umarnin da aka yi amfani dasu don fara aiwatarwa. Don haka ba kwa buƙatar sanin ainihin sunan lokacin da kuke son kashe hanyoyin.
htop
Wannan htop ne, a m tsarin kallo para Unix tsarin. Aikace-aikace ne a cikin yanayin rubutu (don na'ura mai kwakwalwa) daga wacce zamu iya ganin bude hanyoyin, kashe ayyukan, ganin aikin CPU, sarrafa ƙwaƙwalwar da aka cinye, da dai sauransu.
Samu tsarin bayanai:
ps
Ps yana nufin matsayin tsari. Ana amfani da wannan umarnin don nuna a Jerin tsari wanda ke gudana a ƙarƙashin mai amfani na yanzu. Umurnin zai nuna mana suna da lambar tantancewa ta aiki (PID) wanda za'a iya amfani dashi tare da sauran umarni.
top
Wannan umarni ne na bayani. Babban umarni yana nuna waɗanne ayyuka ne suka fi aikatawa Amfani da CPU. Yana ba mu damar tantance jerin ta hanyar amfani da CPU ko RAM, tsawon lokacin da shirin ke gudana, da sauran abubuwan. Da zarar an zartar da umarnin, zamu iya samun taimako ta latsa maɓallin 'h'.
vmstat
Maimakon ganin wannan bayanin kai tsaye kamar yadda muke yi tare da babban umarnin, zamu iya ɗaukar hoton shi. Vmstat yayi haka kawai. Samu kallon lokaci na matakai a halin yanzu suna gudana da kuma yawan ƙwaƙwalwar da suke amfani da ita.
free
Wannan umarnin shine ƙwaƙwalwar ajiya. Nuna da adadin ƙwaƙwalwar ajiya yana samuwa. Ginshikan suna nuna kyauta da kuma amfani da zahiri da musanya ƙwaƙwalwa. Hakanan zaka iya ganin ma'ajin da kernel yayi amfani dashi.
lscpu
Wannan umarni ne ga ba da mahallin ga bayanin da aka samu tare da umarnin da ke sama kamar yadda ba tare da mahallin ba ma'ana ce. CPUs nawa kwamfutarka ke dasu? Wani irin gine-gine kuke amfani dashi? Yi amfani da lscpu don ganin wannan bayanin da aka gabatar a hanya mai sauƙi.
Kamar yadda kuka karanta a cikin labarin, waɗannan shirye-shiryen da umarnin sune don sarrafa abin da ke faruwa akan kwamfutarka ta amfani da tashar. Aikin tsarin aiki shine taimakawa don aiwatar da abubuwa, kuma idan software ta daskare bawai tana yin aikinta yadda yakamata. Yanzu zamu iya kiyaye software mara kyau. Linux yana da suna don kasancewa tsarin aiki mai ɗorewa, amma wannan ba yana nufin cewa duk aikace-aikacen suna da ƙarfi ba.
Abubuwan da aka ambata suna da hanyoyi daban-daban na aiki. Don samun ƙarin bayani ana bada shawarar juya zuwa "mutum" don ganin irin damar da kowannensu ya bayar. Waɗannan bazai zama ƙa'idodin aikace-aikacen masu amfani waɗanda suka shigo daga Windows ba, amma amfani da su koyaushe yana da mahimmanci ba da daɗewa ba.