1.\" 2.\" Copyright (c) 2003 Mike Barcroft <mike@FreeBSD.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.Dd July 25, 2025 27.Dt JLS 8 28.Os 29.Sh NAME 30.Nm jls 31.Nd "list jails" 32.Sh SYNOPSIS 33.Nm 34.Op Fl -libxo 35.Op Fl dhNnqsv 36.Op Fl j Ar jail 37.Op Ar parameter ... 38.Nm 39.Fl c 40.Op Fl d 41.Fl j Ar jail 42.Sh DESCRIPTION 43The 44.Nm 45utility lists all active jails, or the specified jail. 46Each jail is represented by space-separated values of the listed 47.Ar parameters , 48one jail per line (unless the parameters themselves contain newlines). 49The pseudo-parameter 50.Va all 51will show all available jail parameters. 52A list of available parameters can be retrieved via 53.Dq Nm sysctl Fl d Va security.jail.param . 54See 55.Xr jail 8 56for a description of some core parameters. 57.Pp 58If no 59.Ar parameters 60or any of the options 61.Fl chns 62are given, the following four columns will be printed: 63jail identifier (jid), IP address (ip4.addr), hostname (host.hostname), 64and path (path). 65.Pp 66When the 67.Fl c 68option is used, 69.Nm 70will not emit any output except for usage errors. 71This mode is intended solely to check for a single jail's existence, and it does 72not accept any 73.Ar parameter 74or print-option flags. 75.Pp 76The following options are available: 77.Bl -tag -width indent 78.It Fl -libxo 79Generate output via 80.Xr libxo 3 81in a selection of different human and machine readable formats. 82See 83.Xr xo_options 7 84for details on command line arguments. 85.It Fl c 86Only check for the jail's existence. 87.It Fl d 88List 89.Va dying 90as well as active jails. 91.It Fl h 92Print a header line containing the parameters listed. 93If no parameters are given on the command line, 94.Va all 95is assumed. 96.It Fl N 97In the standard display mode, print each jail's name instead of its 98numeric ID. 99If the jail does not have a name, the numeric ID is printed instead. 100.It Fl n 101Print parameters in 102.Dq name=value 103format, where each parameter is preceded by its name. 104If no parameters are given on the command line, 105.Va all 106is assumed. 107.It Fl q 108Put quotes around parameters if they contain spaces or quotes, or are 109the empty string. 110.It Fl s 111Print parameters suitable for passing to 112.Xr jail 8 , 113skipping read-only and unused parameters. 114Implies 115.Fl nq . 116.It Fl v 117Extend the standard display with a multiple-line summary per jail, 118containing the following parameters: 119jail identifier (jid), hostname (host.hostname), path (path), 120jail name (name), jail state (dying), cpuset ID (cpuset), 121IP address(es) (ip4.addr and ip6.addr). 122.It Fl j Ar jail 123The jid or name of the 124.Ar jail 125to list. 126Without this option, all active jails will be listed. 127.El 128.Sh SEE ALSO 129.Xr jail_get 2 , 130.Xr libxo 3 , 131.Xr xo_options 7 , 132.Xr jail 8 , 133.Xr jexec 8 134.Sh HISTORY 135The 136.Nm 137utility was added in 138.Fx 5.1 . 139Extensible jail parameters were introduced in 140.Fx 8.0 . 141libxo support was added in 142.Fx 11.0 . 143