]> git.ipfire.org Git - thirdparty/util-linux.git/blame - sys-utils/lsns.8
build-sys: support 'none' for parallel tests
[thirdparty/util-linux.git] / sys-utils / lsns.8
CommitLineData
5330b97e 1.\" Man page for the lsns command.
1bb4fe24
KZ
2.\" Copyright 2015 Karel Zak <kzak@redhat.com>
3.\" May be distributed under the GNU General Public License
4
5.TH LSNS 8 "December 2015" "util-linux" "System Administration"
6.SH NAME
7lsns \- list namespaces
8.SH SYNOPSIS
9.B lsns
10[options]
5330b97e 11.RI [ namespace ]
1bb4fe24
KZ
12
13.SH DESCRIPTION
14.B lsns
15lists information about all the currently accessible namespaces or about the
16given \fInamespace\fP. The \fInamespace\fP identifier is an inode number.
17
0e4f6b2a
KZ
18The default output is subject to change. So whenever possible, you should
19avoid using default outputs in your scripts. Always explicitly define expected
5330b97e
BS
20columns by using the \fB\-\-output\fR option together with a columns list in
21environments where a stable output is required.
0e4f6b2a 22
7817b2ad 23\fBNSFS\fP column, printed when \fBnet\fP is specified for
7cd784d0 24\fB\-\-type\fR option, is special; it uses multi-line cells.
f593e279 25Use the option \fB\-\-nowrap\fR is for switching to "," separated single-line
7817b2ad
MY
26representation.
27
5330b97e
BS
28Note that \fBlsns\fR reads information directly from the /proc filesystem and
29for non-root users it may return incomplete information. The current /proc
30filesystem may be unshared and affected by a PID namespace
31(see \fBunshare \-\-mount\-proc\fP for more details).
63549365 32.B lsns
5330b97e
BS
33is not able to see persistent namespaces without processes where the namespace
34instance is held by a bind mount to /proc/\fIpid\fR/ns/\fItype\fR.
1bb4fe24
KZ
35
36.SH OPTIONS
37.TP
38.BR \-J , " \-\-json"
39Use JSON output format.
40.TP
41.BR \-l , " \-\-list"
42Use list output format.
43.TP
44.BR \-n , " \-\-noheadings"
45Do not print a header line.
46.TP
47.BR \-o , " \-\-output " \fIlist\fP
5330b97e 48Specify which output columns to print. Use \fB\-\-help\fR
1bb4fe24
KZ
49to get a list of all supported columns.
50
51The default list of columns may be extended if \fIlist\fP is
5330b97e 52specified in the format \fB+\fIlist\fP (e.g. \fBlsns \-o +PATH\fP).
1bb4fe24 53.TP
1f7b62e0
SK
54.B \-\-output\-all
55Output all available columns.
56.TP
1bb4fe24 57.BR \-p , " \-\-task " \fIpid\fP
d35df4db 58Display only the namespaces held by the process with this \fIpid\fR.
1bb4fe24
KZ
59.TP
60.BR \-r , " \-\-raw"
61Use the raw output format.
62.TP
63.BR \-t , " \-\-type " \fItype\fP
5330b97e 64Display the specified \fItype\fP of namespaces only. The supported types are
2b8889c4
MB
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.
1bb4fe24
KZ
67.TP
68.BR \-u , " \-\-notruncate"
69Do not truncate text in columns.
70.TP
7817b2ad
MY
71.BR \-W , " \-\-nowrap"
72Do not use multi-line text in columns.
73.TP
1bb4fe24
KZ
74.BR \-V , " \-\-version"
75Display version information and exit.
76.TP
77.BR \-h , " \-\-help"
78Display help text and exit.
79
80.SH AUTHORS
81.nf
82Karel Zak <kzak@redhat.com>
83.fi
84
85.SH "SEE ALSO"
1bb4fe24 86.BR nsenter (1),
f053ff1e 87.BR unshare (1),
d628c0d7
MK
88.BR clone (2),
89.BR namespaces (7)
1bb4fe24
KZ
90
91.SH AVAILABILITY
92The lsns command is part of the util-linux package and is available from
d673b74e 93https://www.kernel.org/pub/linux/utils/util-linux/.