LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what is chroot? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-chroot-745401/)

McPriMa 08-05-2009 04:34 PM

what is chroot?
 
what is chroot?

karamarisan 08-05-2009 04:36 PM

Okay, dude, stop that. Look into the command `man` - if you really want to know, you need to learn to do your own research and learn things independently.

scottro11 08-05-2009 07:25 PM

In this case, I think the Linux man page is rather lacking.

One tip---many Linux man pages are really horrible. Often going to www.freebsd.org or www.openbsd.org will enable you to find better man pages.


Hrrm, looking at the BSD man pages for root, though they're quite clear if you're experienced, I could see them being confusing too.


When you log in, your root directory, that is, the base directory of the system, is / (root.)

Doing chroot makes it a different directory. This is sometimes used, for example, if you have Fedora on one partition and Ubuntu on the other, but need to run some commands from inside the Ubuntu system.
So, first you mount the Ubuntu partition, say on /mnt. Then you also mount, with the bind option, /proc and /dev.

Now, you can do

chroot /mnt /bin/bash

You will now be working as if you had booted up into the Ubuntu system.

chrism01 08-05-2009 11:36 PM

http://www.linuxtopia.org/online_boo...p29sec296.html


All times are GMT -5. The time now is 05:32 PM.