Classnotes | UNIX01 | RecentChanges | Preferences Chroot is a slightly advanced UNIX concept. The basic premise behind it is that you can create a smaller duplicate of your working system inside of a subdirectory with restricted access inside your system. You can then chrootsomething (it could be a process, a user, or even yourself) into that directory, meaning you "change root" from normal root (/) to this new root. The purposes for this vary- you could be doing it for security reasons, as a way of doing system tests, or even performing a recovery on another system.
While we will not be using chroot in this class (that will wait for UNIX02 and UNIX03), we will start off by creating a simple chroot structure. This structure would be ready for chroot'ing in the future, though we will not be doing that in this class.
Create a directory called /home/jail/bob. Under that directory, recreate the essential directories of the root file system, namely:
/etc
/bin
/lib
/var
/tmp
/usr
/home
Populate that directory structure with the following essential commands: