Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Chroot is a way of isolating applications from the rest of your computer, by putting them in a jail. This is particularly useful if you are testing an application which could potentially alter important system files, or which may be insecure.
SEE ALSO
chroot(2)
The full documentation for chroot is maintained as a Texinfo manual.
If the info and chroot programs are properly installed at your site,
the command
info coreutils 'chroot invocation'
should give you access to the complete manual.
GNU coreutils 8.21 February 2013 CHROOT(1)
lines 32-56/56 (END)
chroot can also be used to reset the root password coming from a rescue system. Image you lost root password, start a live cd, then mount the "original" system and chroot to it. After that passwd root sets a new password.
Another example is if you installed a system through debootstrap to finalize the process you chroot to the new system. Or if you have a virtual disk that you want to access outside of the virtual machine. Mount it through loop and chroot to it.
Here is a bit unusual way to use chroot. I have a Zotac box as MythTV frontend. Binary distros keep crashing on it, but Gentoo runs rock solid. To run Gentoo one has to compile alot. This little box really can't take compiling, it overheats and shuts down. So I export the root filesystem from Zotac over NFS, mount it from another computer, chroot into Zotac and build everything not using Zotac resources at all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.