I am moving from FreeBSD/Freenas to Debian/Freenas Scale eventually, but the question is broader. What would be the equivalent for jails on Linux osses.

Now most will recommend docker or some variant of that. I would agree but I really REALLY like how jails work how I can go to the shell and change/install what I need. The Problem is (AFAIK) it's not possible to tread a docker like a jail, so it would have to be build pre-configured etc. It's not for me.

Then the next option is VM this would work I suppose, but it feels overcomplicate to create vm for every app besides won't it waste recourses ?.

So I am looking for recommendations what to replace my current jails with to keep as much functionality as they have now.

  • 2
    If you like jails so much, and moving causes complications and mismatches, why are you moving?
    – Rob
    Jan 3 at 12:33
  • My guess is because TrueNAS SCALE is Linux. Which raises a design question: are the scale out compute or whatever features important enough to port the jails to Linux? Jan 10 at 17:25
  • @ Rob Because I despise FreeBSD. More so then having to switch to docker if it comes to that. @JohnMahowald Anything other then freeBSD is important enough for me. Btw I am no orientate to jails I am happy with anything that wil give the config options like jails. Docker would seem logical and actually nice to use, but they made a efford it seems to me to make creating containers as hard as possible. Docker would fit my need perfectly if I could shell into them setup everything as I like just like jails. Jan 10 at 22:56
  • I shouldn't say this here but I was once pretty knowledgeable in this area and I think you will technically learn to despise Linux with your decision to switch as you will sorely miss the advantages on FreeBSD.
    – Rob
    Jan 12 at 11:41

If you need to use a certain operating system for design reasons, you will need to port tools to that.

We don't do product recommendations, so you'll need to find or create container management tools. Jails are definitely different from Linux containers in implementation details. However, a comparison of container tech will show they are similar at a high level.

FreeBSD jails are chroot enhanced with isolation of other resources. Plus tools to manage lifecyle, install from media, start, stop.

Linux's similar isolation mechanism are namespaces. Network, user, mount, IPC, uname. Most container tooling built on these (there are several choices) impose their own ideas of how everything should work; Docker is not only a chroot. You might not like how Docker does images or networking.

However, it is possible to use Linux namespaces without what you think of as a container. Wikipedia page on namespaces has an interesting idea of adding process isolation to chroots:

SHELL=/bin/sh unshare --fork --pid chroot "${chrootdir}" "$@"

Not included, the steps of creating this chroot and installing stuff to it.


you may want to explain with more details what are the features you like in jails you miss in containers. I personally run LXC containers and they have their personnality (debian or ubuntu on a debian host). I can SSH in them, they have their own IP stack segregated from the host IP stack thanks to network namespaces and I can install and run in them their own set of applications with no interactions to hosts applications thanks to process namespace.

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