GNU/Linux Reasons to use chroot


Example

Changing root is commonly done for performing system maintenance on systems where booting and/or logging in is no longer possible.

Common examples are:

  • reinstalling the bootloader
  • rebuilding the initramfs image
  • upgrading or downgrading packages
  • resetting a forgotten password
  • building software in a clean root environment