1 .\" Man page for the lsns command.
2 .\" Copyright 2015 Karel Zak <kzak@redhat.com>
3 .\" May be distributed under the GNU General Public License
5 .TH LSNS 8 "December 2015" "util-linux" "System Administration"
7 lsns \- list namespaces
15 lists information about all the currently accessible namespaces or about the
16 given \fInamespace\fP. The \fInamespace\fP identifier is an inode number.
18 The default output is subject to change. So whenever possible, you should
19 avoid using default outputs in your scripts. Always explicitly define expected
20 columns by using the \fB\-\-output\fR option together with a columns list in
21 environments where a stable output is required.
23 \fBNSFS\fP column, printed when \fBnet\fP is specified for
24 \fB\-\-type\fR option, is special; it uses multi-line cells.
25 Use the option \fB\-\-nowrap\fR is for switching to "," separated single-line
28 Note that \fBlsns\fR reads information directly from the /proc filesystem and
29 for non-root users it may return incomplete information. The current /proc
30 filesystem may be unshared and affected by a PID namespace
31 (see \fBunshare \-\-mount\-proc\fP for more details).
33 is not able to see persistent namespaces without processes where the namespace
34 instance is held by a bind mount to /proc/\fIpid\fR/ns/\fItype\fR.
39 Use JSON output format.
42 Use list output format.
44 .BR \-n , " \-\-noheadings"
45 Do not print a header line.
47 .BR \-o , " \-\-output " \fIlist\fP
48 Specify which output columns to print. Use \fB\-\-help\fR
49 to get a list of all supported columns.
51 The default list of columns may be extended if \fIlist\fP is
52 specified in the format \fB+\fIlist\fP (e.g. \fBlsns \-o +PATH\fP).
55 Output all available columns.
57 .BR \-p , " \-\-task " \fIpid\fP
58 Display only the namespaces held by the process with this \fIpid\fR.
61 Use the raw output format.
63 .BR \-t , " \-\-type " \fItype\fP
64 Display the specified \fItype\fP of namespaces only. The supported types are
65 \fBmnt\fP, \fBnet\fP, \fBipc\fP, \fBuser\fP, \fBpid\fP, \fButs\fP and
66 \fBcgroup\fP. This option may be given more than once.
68 .BR \-u , " \-\-notruncate"
69 Do not truncate text in columns.
71 .BR \-W , " \-\-nowrap"
72 Do not use multi-line text in columns.
74 .BR \-V , " \-\-version"
75 Display version information and exit.
78 Display help text and exit.
82 Karel Zak <kzak@redhat.com>
92 The lsns command is part of the util-linux package and is available from
93 https://www.kernel.org/pub/linux/utils/util-linux/.