-3

Is there any different between root and chroot in Linux? Can anyone please explain them?

1
  • 10
    Those aren't remotely the same thing. Have you looked them up?
    – cjm
    Commented Mar 21, 2012 at 16:01

2 Answers 2

5

chroot is an operation, it changes the apparent root directory for the current running process and it's children.

root is an account that by default has access to all commands and files on a Linux (Unix based) system.

root directory is the highest directory in a hierarchy.

1

root directory refers to / which you can take as the root of the filesystem. It contains directories such as home, var.

chroot is the command to change the root directory i.e. changing the / for different user.

For eg.

$ chroot /media

will change the root directory(/) to /media

This is generally used in services like ftp to allow any user to access only a subtree of the whole directory tree. Thus it provide restrictions upto which a user can traverse.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .