mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +00:00
chroot: Add a little chroot program
This program changes the current filesystem root and spawns a shell.
This commit is contained in:
parent
ddd0b19281
commit
3f9e4cd24e
3 changed files with 81 additions and 0 deletions
28
Base/usr/share/man/man8/chroot.md
Normal file
28
Base/usr/share/man/man8/chroot.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
## Name
|
||||
|
||||
chroot - run a shell with a different filesystem root
|
||||
|
||||
## Synopsis
|
||||
|
||||
```**sh
|
||||
# chroot
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
This program uses the [`chroot`(2)](../man2/chroot.md) syscall to switch into a
|
||||
different filesystem root and spawn a shell inside it.
|
||||
|
||||
It will not work unless there is a `/bin/Shell` available inside the new root.
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
# chroot /var/chroot
|
||||
# pwd
|
||||
/
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
* [`chroot`(2)](../man2/chroot.md)
|
Loading…
Add table
Add a link
Reference in a new issue