Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question
10  
Those aren't remotely the same thing. Have you looked them up? –  cjm Mar 21 '12 at 16:01
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.