OpenRC to systemd Cheatsheet

This article is for users that have recently converted from OpenRC to systemd. It contains a Article description::list of commands commonly used in OpenRC and its equivalent systemd command.

Note
The following table is not an exhaustive list and is not intended to replace reading man pages.
CommandOpenRCsystemdComments
Start a service/etc/init.d/<service> start
rc-service <service> start
systemctl start <service>
Stop a service/etc/init.d/<service> stop
rc-service <service> stop
systemctl stop <service>
Restart a service/etc/init.d/<service> restart
rc-service <service> restart
systemctl restart <service>
Get service status/etc/init.d/<service> status
rc-service <service> status
systemctl status <service>
Show known startup scriptsrc-status
rc-update show
systemctl list-unitsShows scripts that exist in runlevels
Show all startup scriptsls /etc/init.d/
rc-update -v show
systemctl list-unit-files --type=serviceShows all installed scripts
Enable service at startuprc-update add <service> <runlevel>systemctl enable <service>
Disable service at startuprc-update del <service> <runlevel>systemctl disable <service>

The following table is a list of useful systemd commands that have no OpenRC equivalent:

CommandSyntaxComments
Disable automatically generated servicesystemctl mask <service>Disables dynamically generated services in systemd, which unit files are generated on demand (usually storage triggered services).
Kill all processes related to servicesystemctl kill <service>
Show logs events that happened today, most recent events firstjournalctl -r --since=today
Show log events for a specific servicejournalctl _SYSTEMD_UNIT=<service>.service
This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.