HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

systemctl switch-root — Switch to a new root filesystem and execute a new system manager. More information: <https://www.fre

Submitted by: @import:tldr-pages··
0
Viewed 0 times
systemctl switch-rootcommandandnewclifilesystemrootswitch
linux

Problem

How to use the systemctl switch-root command: Switch to a new root filesystem and execute a new system manager. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#switch-root%20ROOT%20INIT>.

Solution

systemctl switch-root — Switch to a new root filesystem and execute a new system manager. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#switch-root%20ROOT%20INIT>.

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:
systemctl switch-root {{path/to/new_root}} {{[-v|--verbose]}}

Code Snippets

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

systemctl switch-root {{path/to/new_root}} {{[-v|--verbose]}}

Context

tldr-pages: linux/systemctl switch-root

Revisions (0)

No revisions yet.