FreeBSD Jail Management

Elvin Aslanov
2 min readJul 9, 2022


FreeBSD jails is a containerization (lightweight virtualization) technology native to FreeBSD operating system.

This is similar to Docker in the Linux world.

System Commands

  • jail(8): create (-c), remove (-r), modify (-m), and exhibit (-e) jails
  • jls(8): list (exhibit) jails in human-friendly formats
  • jexec(8): execute commands within jails

System Commands Supporting Jails

The list is quiet extensive and includes FreeBSD commands such a pgrep, pkill, killall and so on.

Configuration Files

eg. service jail MyJail console

System Calls

Controlling jails from C programming languages including the sys/jail.h header file.


There’s also libjail, an included C library for jail management calling the system calls above.

  • jail(3): front-end interface library to jail system calls

Source Code

In the package jail

Knowing these frees us from relying on the third-party software such as such as eazyjail and iocage to manage jails on a FreeBSD system conveniently.

FreeBSD Jails are documented in the Chapter 15 of the FreeBSD Handbook.



Elvin Aslanov

Unix and Open Source Software passionate. Currently working as Tech Support / System Administrator at a Web Hosting company.