Multiple choice technology operating systems

what is the use of chroot command?

  1. Runs a command with a different root directory

  2. Runs a command with a same root directory

  3. Runs a command in root directory

  4. Runs a command with a different /opt directory

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The chroot command runs a command or process with a different root directory than the system's actual root. This creates an isolated environment where the process cannot access files outside the specified directory tree. It's commonly used for system recovery, testing, and security isolation. Option B is wrong because chroot uses a DIFFERENT root, not the same. Option C is incomplete - it runs with a different root, not necessarily in the actual root directory. Option D mentions /opt which is unrelated to chroot's purpose.