Cheat Sheet: systemctl vs chkconfig

Since I’ve mostly been using Red Hat or the gui desktop of Ubuntu lately I’ve neglected to notice the transitions from the sysVinit packages to systemd. Recently I installed Fedora 16 and was a little surprised when chkconfig didn’t work anymore. I decided I would write a post that gives the systemctl version of a few common chkconfig commands.

List processes

chkconfig:

# chkconfig --list

systemd:

# systemctl list-units

Enable a service

chkconfig:

# chkconfig <servicename> on

systemd:

# systemctl enable <servicename>.service

Disable a service

chkconfig:

# chkconfig <servicename> off

systemd:

# systemctl disable <servicename>.service

Start a service

chkconfig:

# service <servicename> start

systemd:

# systemctl start <servicename>.service

Stop a service

chkconfig:

# service <servicename> stop

systemd:

# systemctl stop <servicename>.service

Check the status of a service

chkconfig:

# service <servicename> status

systemd:

# systemctl status <servicename>.service

About Benjamin

Benjamin is a Infrastructure and Software Engineer. On this blog he writes about Linux, Docker, Programming as well as other Systems topics.

Learn more about Linux

If you liked this article, check out Benjamin's book: Red Hat Enterprise Linux Troubleshooting Guide. Where you can learn a lot more about troubleshooting Linux systems. This book is filled with tips and techniques he has learned over years of managing mission critical systems.