zonecfg(8) on Solnix vs Linux and the BSDs
zonecfg is the illumos command at /usr/sbin/zonecfg. It stores the configuration of a zone (resources and properties) and does not start anything or touch a running zone. Linux systemd-nspawn and FreeBSD jail(8) take their settings at launch, whereas on Solnix a configuration change only takes effect after the zone is rebooted.
The manual pages
- Solnix: zonecfg(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: systemd-nspawn(1) systemd-260.5 (different command, similar job)
- FreeBSD: jail(8) 15.1-RELEASE (different command, similar job)
What Solnix runs
A default Solnix system runs the illumos zonecfg at /usr/sbin/zonecfg. No other variants are shipped. The page's SYNOPSIS shows -z zonename, an optional subcommand, -f command_file and help. The bundle text is trimmed, so subcommands, exit status and the ATTRIBUTES section are not covered here. Booting and state changes are done with zoneadm(8), which the page refers to.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD | configuration versus launch | zonecfg only creates and modifies a zone's stored configuration. systemd-nspawn runs a command or OS from command-line options. FreeBSD jail -c creates a jail from parameters or jail.conf. Neither has a separate configure-then-boot step.Source: Solnix zonecfg(8) DESCRIPTION; Linux systemd-nspawn(1) DESCRIPTION, OPTIONS; FreeBSD jail(8) DESCRIPTION, -c |
| FreeBSD | changing a running instance | On Solnix, parameters changed through zonecfg do not affect a running zone; the zone must be rebooted. FreeBSD jail -m modifies an existing jail, though some parameters cannot be changed on a running jail, and -mr may restart it.Source: Solnix zonecfg(8) DESCRIPTION; FreeBSD jail(8) -m, -mr |
| Linux, FreeBSD | how settings are given | zonecfg -z zonename takes subcommands interactively or from a file with -f command_file, using resources and properties scoped by resource type. FreeBSD uses name=value parameters on the command line or in /etc/jail.conf (-f conf_file). systemd-nspawn uses command-line options.Source: Solnix zonecfg(8) SYNOPSIS, Resources; FreeBSD jail(8) -f, Jail Parameters; Linux systemd-nspawn(1) OPTIONS |
| FreeBSD | -f means different things | zonecfg -f reads a file of zonecfg commands. FreeBSD jail -f names an alternate configuration file in place of /etc/jail.conf. Both are file-reading options, but the file formats are not interchangeable.Source: Solnix zonecfg(8) SYNOPSIS (-f command_file); FreeBSD jail(8) -f conf_file |
| Linux | per-container settings files | systemd-nspawn reads optional per-container .nspawn files, searched in /etc/systemd/nspawn/ and /run/systemd/nspawn/. Command-line options override them unless --settings=override is used. The zonecfg page names no such file in the text shown; the configuration is edited through zonecfg.Source: Linux systemd-nspawn(1) --settings; Solnix zonecfg(8) SYNOPSIS |
| Linux, FreeBSD | resource limits live in the configuration | zonecfg has resource types for CPU caps (capped-cpu), dedicated CPUs (dedicated-cpu), memory caps (capped-memory), ZFS datasets (dataset), devices, file systems, network interfaces and rctls. It also has global properties such as max-lwps and max-processes. The bundle's jail and nspawn texts use their own parameters and options for these. Source: Solnix zonecfg(8) Resources, Properties; Linux systemd-nspawn(1) OPTIONS; FreeBSD jail(8) Jail Parameters |
| Linux, FreeBSD | autoboot depends on the zones service | A zone's autoboot property has no effect if the zones service is disabled. Enable it with svcadm enable svc:/system/zones:default. The Linux and FreeBSD texts here describe no equivalent property: systemd-nspawn can be run as a service from the systemd-nspawn@.service template. Source: Solnix zonecfg(8) autoboot; Linux systemd-nspawn(1) DESCRIPTION; FreeBSD jail(8) DESCRIPTION |
| Linux, FreeBSD | brand | Every zone has a brand that sets its user-level environment and behaviour at install, boot and shutdown. It cannot be changed after install, and some brands do not support all properties. The Linux and FreeBSD pages describe no brand concept. Source: Solnix zonecfg(8) DESCRIPTION, brand; Linux systemd-nspawn(1); FreeBSD jail(8) |
| Linux, FreeBSD | IP networking model | The zonecfg ip-type property is shared (the default, sharing the global zone's IP instance) or exclusive. net resources have address, allowed-address, physical and defrouter. The nspawn page uses options such as --private-network and --network-veth; the jail page uses ip parameters.Source: Solnix zonecfg(8) ip-type, net; Linux systemd-nspawn(1) options list; FreeBSD jail(8) Jail Parameters |
| Linux | where the root file system comes from | A zone's root is the zonepath global property. systemd-nspawn takes it from --directory= or finds it via --machine=, mainly under /var/lib/machines/. It also checks for os-release in the tree before booting.Source: Solnix zonecfg(8) zonepath; Linux systemd-nspawn(1) DESCRIPTION |
| Linux, FreeBSD | property value syntax | zonecfg values are simple strings, complex values like (name=value,...) or lists like [a,b]. A one-item list equals the bare value. Values are matched with fnmatch(7). FreeBSD jail lists use commas or +=; systemd-nspawn uses plain option arguments. Source: Solnix zonecfg(8) Properties; FreeBSD jail(8) Jail Parameters |
Everyday tasks
| Task | Solnix | Linux | FreeBSD |
|---|---|---|---|
| define or edit a container's configuration | zonecfg -z zonename (interactive, subcommand, or -f command_file) | systemd-nspawn options, or a .nspawn settings file | edit /etc/jail.conf, or jail -c name=value ... |
| apply a change to a running instance | reboot the zone (changes do not affect a running zone) | — | jail -m (some parameters need -mr) |
| create and start | zoneadm boot (see zoneadm(8)) | systemd-nspawn --boot, or machinectl | jail -c |
| run at system boot | set the autoboot property and enable svc:/system/zones:default with svcadm | systemd-nspawn@.service template unit | — |
Standards
- POSIX: zonecfg is not a POSIX.1-2024 utility.
- Linux: systemd-nspawn implements the Container Interface specification.
Writing portable scripts
- There is no common command or file format for containers across Solnix, Linux and FreeBSD. Wrap zonecfg, systemd-nspawn and jail in separate functions and branch on which tool is present.
- Do not expect configuration changes to apply to a running instance. On Solnix, plan a zone reboot after zonecfg.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.