Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

CentOS / RHEL 7 : systemctl

replacements of legacy
commands service and
chkconfig
by admin

The post lists the new systemctl command in RHEL 7 with the legacy
service/chkconfig command. Legacy commands service and chkconfig are still
compatible in RHEL 7 with forwarding/redirecting information output of prevailing
command systemctl.

Starting, stopping and checking status of a service

Start a service:

# systemctl start [service_name]

for example:
# systemctl start multipathd

Stop a service:

# systemctl stop [service_name]

for example:

# systemctl stop multipathd

Check status of a service:

# systemctl status [service_name]

for example:

# systemctl status multipathd

Enabling or disabling auto-start of a service

Enable auto-start a service at boot (equivalent of chkconfig):


# systemctl enable [service_name]

for example:

# systemctl enable multipathd

Disable auto-start a service at boot:

# systemctl disable [service_name]

for exmaple:

# systemctl disable multipathd

Listing services

List active service units:

# systemctl list-units --type service

List enabled/disabled status of all installed service units:

# systemctl list-unit-files --type service

You might also like