Enable Services on Startup in Linux

The chkconfig command can also be used to activate and deactivate services. The chkconfig --list command displays a list of system services and whether they are started (on) or stopped (off) in run levels 0-6.

abrt-ccpp          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
atd                0:off  1:off  2:off  3:on   4:on   5:on   6:off
auditd             0:off  1:off  2:on   3:on   4:on   5:on   6:off
autofs             0:off  1:off  2:off  3:on   4:on   5:on   6:off
blk-availability   0:off  1:on   2:on   3:on   4:on   5:on   6:off
certmonger         0:off  1:off  2:off  3:on   4:on   5:on   6:off
cgconfig           0:off  1:off  2:off  3:off  4:off  5:off  6:off
cgred              0:off  1:off  2:off  3:off  4:off  5:off  6:off
cpuspeed           0:off  1:on   2:on   3:on   4:on   5:on   6:off

For example, if you wish to enable apache2 service in your system during startup, you can use the following command to activate it:

chkconfig httpd on

Similarly to turn off the service, use:

chkconfig httpd off
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s