2025-12-16 10:20:31 -07:00
|
|
|
# systemctl switch-root
|
|
|
|
|
|
|
|
|
|
> Switch to a new root filesystem and execute a new system manager.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#switch-root%20ROOT%20INIT>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Switch to a new root filesystem and execute its default init system:
|
|
|
|
|
|
|
|
|
|
`systemctl switch-root {{path/to/new_root}}`
|
|
|
|
|
|
|
|
|
|
- Switch to a new root filesystem and run a specific init binary:
|
|
|
|
|
|
|
|
|
|
`systemctl switch-root {{path/to/new_root}} {{/sbin/init}}`
|
|
|
|
|
|
|
|
|
|
- Switch to a new root filesystem with verbose output:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`systemctl switch-root {{path/to/new_root}} {{[-v|--verbose]}}`
|