xref: /freebsd/usr.sbin/jls/jls.8 (revision 3b8f08459569bf0faa21473e5cec2491e95c9349)
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.\" $FreeBSD$
27.\"
28.Dd July 20, 2012
29.Dt JLS 8
30.Os
31.Sh NAME
32.Nm jls
33.Nd "list jails"
34.Sh SYNOPSIS
35.Nm
36.Op Fl dhNnqsv
37.Op Fl j Ar jail
38.Op Ar parameter ...
39.Sh DESCRIPTION
40The
41.Nm
42utility lists all active jails, or the specified jail.
43Each jail is represented by one row which contains space-separated values of
44the listed
45.Ar parameters ,
46including the pseudo-parameter
47.Va all
48which will show all available jail parameters.
49A list of available parameters can be retrieved via
50.Dq Nm sysctl Fl d Va security.jail.param .
51See
52.Xr jail 8
53for a description of some core parameters.
54.Pp
55If no
56.Ar parameters
57or any of the options
58.Fl hns
59are given, the following four columns will be printed:
60jail identifier (jid), IP address (ip4.addr), hostname (host.hostname),
61and path (path).
62.Pp
63The following options are available:
64.Bl -tag -width indent
65.It Fl d
66List
67.Va dying
68as well as active jails.
69.It Fl h
70Print a header line containing the parameters listed.
71If no parameters are given on the command line,
72.Va all
73is assumed.
74.It Fl N
75In the standard display mode, print each jail's name instead of its
76numeric ID.
77If the jail does not have a name, the numeric ID is printed instead.
78.It Fl n
79Print parameters in
80.Dq name=value
81format, where each parameter is preceded by its name.
82If no parameters are given on the command line,
83.Va all
84is assumed.
85.It Fl q
86Put quotes around parameters if they contain spaces or quotes, or are
87the empty string.
88.It Fl s
89Print parameters suitable for passing to
90.Xr jail 8 ,
91skipping read-only and unused parameters.
92Implies
93.Fl nq .
94.It Fl v
95Print a multiple-line summary per jail, with the following parameters:
96jail identifier (jid), hostname (host.hostname), path (path),
97jail name (name), jail state (dying), cpuset ID (cpuset),
98IP address(es) (ip4.addr and ip6.addr).
99.It Fl j Ar jail
100The jid or name of the
101.Ar jail
102to list.
103Without this option, all active jails will be listed.
104.El
105.Sh SEE ALSO
106.Xr jail_get 2 ,
107.Xr jail 8 ,
108.Xr jexec 8
109.Sh HISTORY
110The
111.Nm
112utility was added in
113.Fx 5.1 .
114Extensible jail parameters were introduced in
115.Fx 8.0 .
116