Interestingly I just went through the same process as I wanted to understand how jails worked without the tools (my preference is iocage if you want something full featured - ez-jail doesn&#x27;t properly handle the new jail.conf approach) - to be honest this is pretty simple and in some cases the tools just add complexity.<p>I ended up writing my own very simple jail wrapper [1] (~200 lines of shell) which does most of this in a very simple way - I wouldn&#x27;t advise this for general use but the code is simple enough to understand what is going on behind the scenes. I chose not to use jail.conf for my use case as I wanted to dynamically create&#x2F;destroy lots of jails programatically and it was easier to just call jail(8) directly in the case.<p>[1] <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;paulchakravarti&#x2F;9afea9e889bc992dbdd2#file-jail-sh" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;paulchakravarti&#x2F;9afea9e889bc992dbdd2...</a>