Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Red Hat Enterprise Linux 9 Essentials Book now available.

Purchase a copy of Red Hat Enterprise Linux 9 (RHEL 9) Essentials

Red Hat Enterprise Linux 9 Essentials Print and eBook (PDF) editions contain 34 chapters and 298 pages

Preview Book

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...


 
 
  Published under the terms of the Creative Commons License Design by Interspire