Say we want to chroot into a different environment residing under
/mnt/testEnv
which could either be a mounted filesystem or just a directory structure
Run:
mount -t proc proc /mnt/testEnv/proc
Next:
mount -o bind /dev /mnt/testEnv/dev
Next:
mount -t sysfs sys /mnt/testEnv/sys
Next:
mount -t devpts pts /mnt/testEnv/dev/pts
Finally:
chroot /mnt/testEnv

