• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

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

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. qm clone Command Examples in Linux
  2. The ultimate Linux interview questions : swap
  3. How to restrict ssh logins by user and client address on CentOS/RHEL
  4. passwd: gkr-pam: couldn’t update the login keyring password: no old password was entered
  5. Understanding the /proc/mounts, /etc/mtab and /proc/partitions files
  6. ntpq Command Examples in Linux
  7. Understanding SELinux Policies in Linux
  8. Echo Command with Practical Examples
  9. debugfs Command Examples in Linux
  10. How to uninstall jellyfish software package from Ubuntu

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright