5 Basis chkconfig Kommando Beispiller am Linux
Dëst ass eis lafend Linux Kommando Serie wou mir iwwerpréiwen wéi mir den chkconfig Kommando effizient benotze mat senge verfügbare Parameteren. De Chkconfig Kommando-Tool erlaabt d'Servicer ze starten an ze stoppen automatesch an den /etc/rd.d/init.d Skripte duerch Kommandozeil. Loosst eis e puer Beispiller gesinn.
1. Lëscht All Services
Benotzt '–Lëscht' Parameter wäert all Servicer an hiren aktuellen Start-up Status an all Run-Level Konfiguratioun ugewisen.
chkconfig --list NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off abrt-ccpp 0:off 1:off 2:off 3:on 4:off 5:on 6:off abrt-oops 0:off 1:off 2:off 3:on 4:off 5:on 6:off ...
2. Check Status vun spezifesch Service
Ënner Kommando weist Startkonfiguratioun fir e bestëmmte Service. Et weist datt HTTP Servicer op all Runniveauen ausgeschalt sinn.
chkconfig --list | grep httpd httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
3. Wéi starten ech e spezielle Service op Run Levels
De folgenden 'chkconfig' Kommando weist wéi mir HTTP-Servicer nëmmen op Run Level 3 a 5 mam '–level' Parameter starten kënnen. Éischt Kommando start httpd Servicer op Run Level 3 an 5 an zweet Kommando verifizéiert de Status vun httpd Servicer déi op Run Level lafen.
chkconfig --level 35 httpd on
chkconfig --list | grep httpd httpd 0:off 1:off 2:off 3:on 4:off 5:on 6:off
4. Wéi kontrolléieren déi Servicer sinn On/Off
De folgende Kommando weist all d'Servicer déi On an Off am spezifesche Run Level 5 sinn.
chkconfig --list | grep 5:on NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off abrt-ccpp 0:off 1:off 2:off 3:on 4:off 5:on 6:off abrt-oops 0:off 1:off 2:off 3:on 4:off 5:on 6:off abrtd 0:off 1:off 2:off 3:on 4:off 5:on 6:off acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off ...
chkconfig --list | grep 5:off dnsmasq 0:off 1:off 2:off 3:off 4:off 5:off 6:off dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off firstboot 0:off 1:off 2:off 3:off 4:off 5:off 6:off kdump 0:off 1:off 2:off 3:off 4:off 5:off 6:off mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off ...
5. Wéi stoppen ech e spezielle Service op Run Levels
De folgende Kommando wäert e Service deen Postfix genannt gëtt fir e just eenzege Runniveau ausschalten. Ähnlech kënne mir e bestëmmte Service a multiple Runniveauen an engem Go ausschalten wéi ënner gewisen.
chkconfig --level 3 postfix off
chkconfig --level 2345 postfix off
Wéi mir all wëssen, ginn et siwe Runniveauen op Linux Betribssystem verfügbar. Mir wäerten déi bedeitendst vu verschiddene Runniveauen a Bootsequenz an Detailer an eisem kommenden Artikel ofdecken. Also, bleift w.e.g. um Lafenden.