← 返回命令列表

Linux command

runsvchdir 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Change service directory

runsvchdir [multi-user]

Switch to rescue mode

runsvchdir [single]

View current runlevel

cat /etc/runit/runsvdir/current

说明

runsvchdir switches which service directory runsvdir supervises. It changes the system's effective runlevel. Runlevels are directories in /etc/runit/runsvdir/. Each contains symlinks to services. The switch is graceful. Services not in the new level are stopped, new ones started. Common levels include default, single, and multi-user. Custom levels can be created. The current symlink tracks active level. /etc/runit/runsvdir/current points to active.

FAQ

What is the runsvchdir command used for?

runsvchdir switches which service directory runsvdir supervises. It changes the system's effective runlevel. Runlevels are directories in /etc/runit/runsvdir/. Each contains symlinks to services. The switch is graceful. Services not in the new level are stopped, new ones started. Common levels include default, single, and multi-user. Custom levels can be created. The current symlink tracks active level. /etc/runit/runsvdir/current points to active.

How do I run a basic runsvchdir example?

Run `runsvchdir [multi-user]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more runsvchdir examples?

This page includes 3 examples for runsvchdir, plus related commands for nearby Linux tasks.