1

I want to test chroot on my Linux machine. I try the following command:

sudo chroot rootfs /bin/bash

After that, I can run some commands that defined in rootfs, e.g., ls, mkdir, ... However, if my command is:

chroot rootfs /bin/bash

I cannot execute any basic commands. I understand that sudo chroot will run the chroot command under the su permission. However, when I run inside the new environment, I don't think su permission matters anymore. May I ask why.

1
  • 1
    Maybe because letting normal user use chroot over whole system is a really huge security risk?
    – BlueManCZ
    Nov 18, 2019 at 20:30

0

You must log in to answer this question.

Browse other questions tagged .