Skip to content

Instantly share code, notes, and snippets.

@0x3n0
Last active May 9, 2022 10:43
Show Gist options
  • Save 0x3n0/7aac75cd7e7b9da47ac6684f6d0a8263 to your computer and use it in GitHub Desktop.
Save 0x3n0/7aac75cd7e7b9da47ac6684f6d0a8263 to your computer and use it in GitHub Desktop.
for i in dev proc sys dev/pts
do
mount -o bind /$i chroot/$i
done
chroot chroot
for i in dev/pts proc sys dev
do
umount -chroot/$i
done
# or
mount -o bind /dev chroot/dev
mount -t sysfs none chroot/sys
mount -t proc none chroot/proc
mount -t devpts none chroot/dev/pts
chroot chroot
for i in dev/pts proc sys dev
do
umount -chroot/$i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment