Files
16870c9bb7 pivot_root: add page (#19673)
* Create pivot_root.md

* Update pivot_root.md

* Update pivot_root.md

* Update pages/linux/pivot_root.md

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>

* Update pivot_root.md

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>

* Update pivot_root.md

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>

* Update pivot_root.md

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>

* Update pivot_root.md

Co-authored-by: Ivan Baluta <50071699+ivanbaluta@users.noreply.github.com>

* Update pages/linux/pivot_root.md

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

---------

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Ivan Baluta <50071699+ivanbaluta@users.noreply.github.com>
2025-12-08 10:53:35 +08:00

510 B

pivot_root

Change the root filesystem to a new directory and move the current root to a subdirectory of the new root. Commonly used during system initialization (e.g., in initramfs) to switch from a temporary root to the real root filesystem. More information: https://manned.org/pivot_root.8.

  • Make /new_root the new root (/) and move current root to a subdirectory of it:

sudo pivot_root {{path/to/new_root}} {{path/to/new_root/old_root}}

  • Display help:

pivot_root {{[-h|--help]}}