syscall.sh / x64 / chroot

chroot

change root directory

sys_chroot(const char *filename)
number161 (0xa1)
abicommon
entry pointsys_chroot
sinceLinux 3.3
man pagechroot(2)
sourceelixir.bootlin.com

Registers

registervalue
rax161, the syscall number
rdiconst char *filename
raxthe return value

Then run syscall to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/chroot