Controlling RHEL 7 Services

One change from RHEL/CentOS 6 to the RHEL 7 beta is how services are controlled. The old service and chkconfig commands are replaced with systemctl. These are my quick and dirty notes compiled from the Fedora Project systemd and SysVinit to Systemd Cheatsheet pages.

Basic Control

The old system command’s replacement is very similar, with services having .service appended:

systemctl start|stop|restart|status name.service

For example:

systemctl restart httpd.service

Service Boot time Control

To get a list of available services and their boot time status:

systemctl list-unit-files --type=service

To set a service to start (or not) at boot time:

systemctl enable|disable <em>service</em>.service

For example:

systemctl enable mariadb.service
systemctl enable httpd.service

Run Levels

Run levels are called targets, have been simplified, and have names now. An incomplete list:

  1. (run level 0)
  2. (single-user mode; run level 1)
  3. (normal run level 3)
  4. (normal run level 5)

To set the default run level:

systemctl set-default

To change the run level:

systemctl isolate

For example, to enter single user mode:

systemctl isolate

And the appropriate services will be stopped and started.

Additional Reading

  • A description of how systemd fits into the boot process here.
  • Another nice summary here.


Updated setting the default run level per CertDepot’s suggestion. Added the “Additional Reading” section.
This entry was posted in SysAdmin and tagged , , , , , , , . Bookmark the permalink.

2 Responses to Controlling RHEL 7 Services

  1. CertDepot says:

    Just to mention that you don’t need to create a link to set the default run level, use the set-default option, for example: systemctl set-default
    To find more information on this topic, go to

  2. Thanks for that tip. I tried it out and it’s a handy wrapper around the symlink process.

Leave a Reply