2025-03-14 21:59:59 -06:00
|
|
|
# arch-chroot
|
|
|
|
|
|
|
|
|
|
> Enhanced `chroot` command to help in the Arch Linux installation process.
|
|
|
|
|
> More information: <https://manned.org/arch-chroot.8>.
|
|
|
|
|
|
|
|
|
|
- Start an interactive shell (Bash, by default) in a new root directory:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`arch-chroot {{path/to/new_root}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Specify the user (other than the current user) to run the shell as:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`arch-chroot -u {{user}} {{path/to/new_root}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Run a custom command (instead of the default Bash) in the new root directory:
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`arch-chroot {{path/to/new_root}} {{command}} {{command_arguments}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Specify the shell, other than the default Bash (in this case, the `zsh` package should have been installed in the target system):
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`arch-chroot {{path/to/new_root}} {{zsh}}`
|