Linux command
rc-update 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List enabled services and their runlevels
rc-update
List all services including disabled ones
rc-update -v
Show services in a specific runlevel
rc-update show [default]
Add a service to a runlevel
sudo rc-update add [service] [default]
Delete a service from a runlevel
sudo rc-update del [service] [default]
Delete a service from all runlevels
sudo rc-update -a del [service]
说明
rc-update manages which services start at which runlevels in OpenRC. Runlevels are named groups of services that start together, such as boot for early boot services, default for normal operation, and shutdown for system shutdown. All services must reside in /etc/init.d or /usr/local/etc/init.d and conform to the OpenRC runscript standard. The tool creates and removes symbolic links in /etc/runlevels/ to control which services start at each runlevel.
参数
- add
- Add a service to the specified runlevel, or the current runlevel if none is given.
- del, delete
- Remove a service from the specified runlevel, or the current runlevel if none is given.
- show
- Show all enabled services and the runlevels they belong to.
- -a, --all
- Apply the operation to all runlevels.
- -s, --stack
- Stack a runlevel instead of a service (advanced usage).
- -u, --update
- Force an update of the dependency tree.
- -v, --verbose
- Show all services, including those that are disabled.
FAQ
What is the rc-update command used for?
rc-update manages which services start at which runlevels in OpenRC. Runlevels are named groups of services that start together, such as boot for early boot services, default for normal operation, and shutdown for system shutdown. All services must reside in /etc/init.d or /usr/local/etc/init.d and conform to the OpenRC runscript standard. The tool creates and removes symbolic links in /etc/runlevels/ to control which services start at each runlevel.
How do I run a basic rc-update example?
Run `rc-update` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does add do in rc-update?
Add a service to the specified runlevel, or the current runlevel if none is given.