Skip to main content Logo (IEC resistor symbol) logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

Systemd rosetta / cheatsheet

Published: 10-02-2013 | Author: Remy van Elst | Text only version of this article

Table of Contents

The below table has systemd versus init examples. the service used as example is nginx :

If you like this article, consider sponsoring me by trying out a Digital Ocean VPS. With this link you'll get $100 credit for 60 days). (referral link)

Action | Debian Init | Ubuntu Upstart | Red Hat/CentOS Init | Systemd
Start service | /etc/init.d/nginx start | initctl start nginx
/etc/init.d/nginx start | /etc/init.d/nginx start | systemctl start nginx.service
Stop service | /etc/init.d/nginx stop | initctl stop nginx
/etc/init.d/nginx stop | /etc/init.d/nginx stop | systemctl stop nginx.service
Restart service | /etc/init.d/nginx restart | initctl restart nginx
/etc/init.d/nginx restart | /etc/init.d/nginx restart | systemctl restart nginx.service
Enable service at boot / startup | update-rc.d nginx defaults | edit /etc/init/nginx.conf, add start on local-filesystems line
update-rc.d nginx defaults | chkconfig nginx on
ntsysv | systemctl enable nginx.service
Disable service at startup / boot | update-rc.d nginx remove | `echo 'manual'

/etc/init/nginx.overrideupdate-rc.d nginx remove|chkconfig nginx off ntsysv|systemctl disable nginx.serviceList all available services |ls /etc/init.d/|initctl list|chkconfig --listntsysv|systemctl list-units -t service --allGet a service status |/etc/init.d/nginx status|initctl status nginx|/etc/init.d/nginx status|systemctl status nginx.service`

Tags: arch-linux , boot , centos , chkconfig , debian , init , redhat , snippets , systemd , sysvinit , ubuntu , upstart