dreamtigers / init-rosetta-stone

https://dreamtigers.github.io/init-rosetta-stone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

init system rosetta stone

The following table works as a Rosetta Stone to manage services depending on the init system1 present in your distribution.

Substitute $service for the name of the service you want to manipulate.

SysV init2 runit systemd
List available services ls /etc/init.d/ ls /etc/sv systemctl list-unit-files
List running services service --status-all ls /var/service systemctl list-units
Start service service $service start3 sv up $service systemctl start $service
Stop service service $service stop3 sv down $service systemctl stop $service
Restart service service $service restart3 sv restart $service systemctl restart $service
Get status of service service $service status3 sv status $service systemctl status $service
Enable service update-rc.d $service defaults4 ln -s /etc/sv/$service /var/service systemctl enable $service
Disable service update-rc.d $service remove4 rm /var/service/$service systemctl disable $service

Please consider using a GNU/Linux distribution that does not use systemd, like Devuan or Void Linux. Read why: init freedom.

Footnotes

  1. There are a lot of other init systems, but here are the ones I've used.

  2. OpenRC builds upon SysV init, so what works for SysV init almost always works for OpenRC. Alpine Linux has a quick-start guide for OpenRC, here.

  3. Or manually, with: /etc/init.d/$service {start|stop|restart|status}. 2 3 4

  4. If you don't have update-rc.d you have to manually add/remove the symlinks to the service, search the internet for a deeper explanation. 2

About

https://dreamtigers.github.io/init-rosetta-stone


Languages

Language:HTML 50.6%Language:CSS 49.4%