Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:centos_contol_services [2017/12/13 17:34] (current)
Line 1: Line 1:
 +====== Controlling Services in CentOS ======
  
 +There are various ways and tools to find and list all running services under Fedora / RHEL / CentOS Linux systems.
 +service command - list running services
 +
 +<code console>
 +service --status-all
 +service --status-all | grep ntpd
 +service --status-all | less
 +</​code>​
 +
 +===== Print the status of any service =====
 +To print the status of apache (httpd) service:
 +<code console>
 +service httpd status
 +</​code>​
 +
 +===== List all known services (configured via SysV) =====
 +<code console>
 +chkconfig --list
 +</​code>​
 +
 +===== List service and their open ports =====
 +<code console>
 +netstat -tulpn
 +</​code>​
 +
 +===== Turn on / off service =====
 +<code console>
 +ntsysv
 +chkconfig service off
 +chkconfig service on
 +chkconfig httpd off
 +chkconfig ntpd on
 +</​code>​
 +
 +ntsysv is a simple interface for configuring runlevel services which are also configurable through chkconfig. By default, it configures the current runlevel. Just type ntsysv and select service you want to run:
  • linux/centos_contol_services.txt
  • Last modified: 2017/12/13 17:34
  • (external edit)