Managing services on Linux

This article applies to Red Hat, Fedora, CentOS, AWS Linux distros.

For enabling, disabling and listing system services, use the script called chkconfig.

List all services

chkconfig --list

List a specific service

chkconfig --list httpd

Turn a service on for specific levels

chkconfig httpd on --level 2,3,5

Disable a service

chkconfig httpd off

For stopping, starting and restarting a service, use the script called service.

service httpd stop
service httpd start
service httpd restart

Leave a Reply

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

You are commenting using your 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