chkconfig command in Linux with Examples

Prerequisite: Run Levels in Linux

chkconfig command is used to list all available services and view or update their run level settings. In simple words it is used to list current startup information of services or any particular service, updating runlevel settings of service and adding or removing service from management.

Synopsis:

chkconfig --list [name]
chkconfig --add name
chkconfig --del name
chkconfig --override name
chkconfig [--level levels] name 
chkconfig [--level levels] name

Options:

  • To List current status of all system services.
    chkconfig --list

  • To View current status of a particular services.
    chkconfig --list rhnsd

  • For Disabling a Service: By default 2 3 4 5 run levels are affected by this command to disable certain run levels only, add –level attribute followed by run level.
    chkconfig rhnsd off

  • Enabling a Service: By default 2 3 4 5 run levels are affected by this command to enable certain run levels only, add –level attribute followed by run level.
    chkconfig rhnsd on

  • To Delete a Service
    chkconfig del rhnsd

  • To add a Service
    chkconfig add rhnsd



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.