Linux – Difference between chroot and jail

bsdchrootlinux

I read this tutorial – https://help.ubuntu.com/community/BasicChroot – and what I understood is that, chroot is the process of changing the / while the new restricted environment created is the "jail". But some people say I am wrong and chroot and jails are 2 completely different things.

Can someone actually explain me the difference in simple terms ?

Best Answer

The short answer is "You're both correct" --

A chroot'ed environment is often called a "chroot jail". It basically restricts the view of a set of processes so they think that the specified directory is the filesystem root.

This should not be confused with FreeBSD's jail functionality, which is a chroot on steroids (with lots of additional functionality that provides more isolation than a simple chroot would).


For the sake of clarity it's best to refer to chrooted environments as "chrooted environment" (or use the full phrase "chroot jail") to distinguish them - especially when talking about a FreeBSD system.

Related Topic