Raymii.org
אֶשָּׂא עֵינַי אֶל־הֶהָרִים מֵאַיִן יָבֹא עֶזְרִֽי׃Home | About | All pages | Cluster Status | RSS Feed
Systemd rosetta / cheatsheet
Published: 10-02-2013 | Author: Remy van Elst | Text only version of this article
❗ This post is over twelve years old. It may no longer be up to date. Opinions may have changed.
The below table has systemd versus init examples. the service used as example is nginx :
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'
Tags: arch-linux , boot , centos , chkconfig , debian , init , redhat , snippets , systemd , sysvinit , ubuntu , upstart/etc/init/nginx.override
update-rc.d nginx remove|chkconfig nginx offntsysv|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`