Linux command
openrc 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Example
sudo openrc [runlevel_name]
Example
sudo openrc -n [runlevel_name]
说明
openrc is the service manager for OpenRC-based systems, providing an alternative to systemd for managing system services and runlevels. It's the default init system on Gentoo, Alpine Linux, and other distributions. OpenRC uses the concept of runlevels (similar to SysV init) to group services that should run together. Common runlevels include default (normal operation), boot (essential services), single (single-user mode), and shutdown. Services are managed through scripts in /etc/init.d/ and configured using rc-update to add or remove them from runlevels.
参数
- -n, --no-stop
- Don't stop any services when changing runlevels
- -o, --override
- Override the next runlevel to go to when leaving single user
- -s, --service
- Run the service specified with the rest of the arguments
- -S, --sys
- Run the service as if in /etc/init.d
FAQ
What is the openrc command used for?
openrc is the service manager for OpenRC-based systems, providing an alternative to systemd for managing system services and runlevels. It's the default init system on Gentoo, Alpine Linux, and other distributions. OpenRC uses the concept of runlevels (similar to SysV init) to group services that should run together. Common runlevels include default (normal operation), boot (essential services), single (single-user mode), and shutdown. Services are managed through scripts in /etc/init.d/ and configured using rc-update to add or remove them from runlevels.
How do I run a basic openrc example?
Run `sudo openrc [runlevel_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n, --no-stop do in openrc?
Don't stop any services when changing runlevels