Product SiteDocumentation Site

7.3. Running the Services

7.3.1. Using the service Utility

The service utility enables you to start, stop, or restart the services from the /etc/init.d/ directory. To use it, make sure you have superuser privileges:
~]$ su -
Password:

Tip

If you are running a graphical user interface, you can also use the Service Configuration utility. See Section 7.2.1, “Using the Service Configuration Utility” for more information.

7.3.1.1. Running the Service

To run the service, type service <service_name> start. For example:
~]# service httpd start
Starting httpd:                                            [  OK  ]

7.3.1.2. Stopping the Service

To stop the service, type service <service_name> stop. For example:
~]# service httpd stop
Stopping httpd:                                            [  OK  ]

7.3.1.3. Restarting the Service

To restart the service, type service <service_name> restart. For example:
~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

7.3.1.4. Checking the Service Status

To check the current status of the service, type service <service_name> status. For example:
Example 7.4. Checking the status of httpd
~]# service httpd status
httpd (pid  7474) is running...

You can also display the status of all available services at once using the --status-all option:
Example 7.5. Checking the status of all services
~]# service --status-all
abrt (pid  1492) is running...
acpid (pid  1305) is running...
atd (pid  1540) is running...
auditd (pid  1103) is running...
automount (pid 1315) is running...
Avahi daemon is running
cpuspeed is stopped
... several lines omitted ...
wpa_supplicant (pid  1227) is running...