Difference between revisions of "User:Megavolt/chroot"
From Manjaro
Views
Actions
Namespaces
Variants
Tools
(add chroot) |
(No difference)
|
Latest revision as of 02:57, 12 September 2022
chroot is a terminal command that gives you the ability to execute commands in another root directory, as well as switch to an interactive shell inside another root directory.
Usage
The command must always be run with root privileges. The general command looks like this:
{{RootCmd|chroot DIRECTORY COMMAND}
This executes a command within a directory. This command must exist in the directory.
Beispiel
To change into the bash shell of another system that you have already mounted in the current one, it needs this command:
{{RootCmd|chroot /mnt /bin/bash -i}
Usually you can omit /bin/bash -i, because the default is always /bin/sh -i, which is generally a link to the default shell, which is usually bash.