Enable Linux service at boot up, using chkconfig command

Configuration for GNU Linux Fedora Computer using Linux Command


    Using the chkconfig command to enable Linux service at boot up and make service start automatically when you boot up or change runlevel on Linux Fedora machine.  The step by step example below show how to enable service on Linux Fedora machine.... more specifically ... we enable web server (httpd) to automatically start each time the Linux machine reboot.

Command use on this example:

# chkconfig --list

# chkconfig --list httpd

# chkconfig --level 35 httpd on

# chkconfig --help


The example below show how to enable web server on Linux Fedora machine...

1.  List all service available on you r Linux machine using chkconfig command.....

List all services on Liux machine using chkconfig command

[root@fedora ~]# chkconfig --list


2.  The httpd service is the name for web server for Linux Fedora machine... the command example below show the use of chkconfig command to display httpd service information

Check service status with chkconfig command

[root@fedora ~]# chkconfig --list httpd

httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

[root@fedora ~]#


To start web server automatically on fedora Linux...

   The Fedora machine usually start on either runlevel 3 or runlevel 5... the chkconfig command example below show, how to enable automatically start the Fedora web server (httpd) on runlevel 3 and runlevel 5..

On httpd services

[root@fedora ~]# chkconfig --level 35 httpd on

[root@fedora ~]#


To verify the changes by using the chkconfig command as example below... make sure that the runlevel 3 and 5 mark as on...

Verify httpd automatically start on boot up

[root@fedora ~]# chkconfig --list httpd

httpd 0:off 1:off 2:off 3:on 4:off 5:on 6:off

[root@fedora ~]#


... and all you need to do now is reboot the Linux machine... from now on your web server is automatically on each time you boot up the machine


To get simple help on using chkconfig command:

Get help on chkconfig command

[root@fedora ~]# chkconfig --help

chkconfig version 1.3.37 - Copyright (C) 1997-2000 Red Hat, Inc.

This may be freely redistributed under the terms of the GNU Public License.


usage: chkconfig [--list] [name]

chkconfig --add <name>

chkconfig --del <name>

chkconfig --override <name>

chkconfig [--level <levels>] <name> <on|off|reset|resetpriorities>

[root@fedora ~]#