]>
Commit | Line | Data |
---|---|---|
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 | |
7 | lsns \- list namespaces | |
8 | .SH SYNOPSIS | |
9 | .B lsns | |
10 | [options] | |
5330b97e | 11 | .RI [ namespace ] |
1bb4fe24 KZ |
12 | |
13 | .SH DESCRIPTION | |
14 | .B lsns | |
15 | lists information about all the currently accessible namespaces or about the | |
16 | given \fInamespace\fP. The \fInamespace\fP identifier is an inode number. | |
17 | ||
0e4f6b2a KZ |
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 | |
5330b97e BS |
20 | columns by using the \fB\-\-output\fR option together with a columns list in |
21 | environments where a stable output is required. | |
0e4f6b2a | 22 | |
1ad0b2fe BF |
23 | The \fBNSFS\fP column, printed when \fBnet\fP is specified for the |
24 | \fB\-\-type\fP option, is special; it uses multi-line cells. Use the option | |
25 | \fB\-\-nowrap\fR to switch to ","-separated single-line representation. | |
7817b2ad | 26 | |
5330b97e BS |
27 | Note that \fBlsns\fR reads information directly from the /proc filesystem and |
28 | for non-root users it may return incomplete information. The current /proc | |
29 | filesystem may be unshared and affected by a PID namespace | |
30 | (see \fBunshare \-\-mount\-proc\fP for more details). | |
63549365 | 31 | .B lsns |
5330b97e BS |
32 | is not able to see persistent namespaces without processes where the namespace |
33 | instance is held by a bind mount to /proc/\fIpid\fR/ns/\fItype\fR. | |
1bb4fe24 KZ |
34 | |
35 | .SH OPTIONS | |
36 | .TP | |
37 | .BR \-J , " \-\-json" | |
38 | Use JSON output format. | |
39 | .TP | |
40 | .BR \-l , " \-\-list" | |
41 | Use list output format. | |
42 | .TP | |
43 | .BR \-n , " \-\-noheadings" | |
44 | Do not print a header line. | |
45 | .TP | |
46 | .BR \-o , " \-\-output " \fIlist\fP | |
5330b97e | 47 | Specify which output columns to print. Use \fB\-\-help\fR |
1bb4fe24 KZ |
48 | to get a list of all supported columns. |
49 | ||
50 | The default list of columns may be extended if \fIlist\fP is | |
eb024893 | 51 | specified in the format \fB+\fIlist\fP (e.g., \fBlsns \-o +PATH\fP). |
1bb4fe24 | 52 | .TP |
1f7b62e0 SK |
53 | .B \-\-output\-all |
54 | Output all available columns. | |
55 | .TP | |
1bb4fe24 | 56 | .BR \-p , " \-\-task " \fIpid\fP |
d35df4db | 57 | Display only the namespaces held by the process with this \fIpid\fR. |
1bb4fe24 KZ |
58 | .TP |
59 | .BR \-r , " \-\-raw" | |
60 | Use the raw output format. | |
61 | .TP | |
62 | .BR \-t , " \-\-type " \fItype\fP | |
5330b97e | 63 | Display the specified \fItype\fP of namespaces only. The supported types are |
96dc4f80 AR |
64 | \fBmnt\fP, \fBnet\fP, \fBipc\fP, \fBuser\fP, \fBpid\fP, \fButs\fP, |
65 | \fBcgroup\fP and \fBtime\fP. This option may be given more than once. | |
1bb4fe24 KZ |
66 | .TP |
67 | .BR \-u , " \-\-notruncate" | |
68 | Do not truncate text in columns. | |
69 | .TP | |
7817b2ad MY |
70 | .BR \-W , " \-\-nowrap" |
71 | Do not use multi-line text in columns. | |
72 | .TP | |
1bb4fe24 KZ |
73 | .BR \-V , " \-\-version" |
74 | Display version information and exit. | |
75 | .TP | |
76 | .BR \-h , " \-\-help" | |
77 | Display help text and exit. | |
78 | ||
79 | .SH AUTHORS | |
80 | .nf | |
81 | Karel Zak <kzak@redhat.com> | |
82 | .fi | |
83 | ||
5a829806 | 84 | .SH SEE ALSO |
1bb4fe24 | 85 | .BR nsenter (1), |
f053ff1e | 86 | .BR unshare (1), |
d628c0d7 MK |
87 | .BR clone (2), |
88 | .BR namespaces (7) | |
1bb4fe24 KZ |
89 | |
90 | .SH AVAILABILITY | |
91 | The lsns command is part of the util-linux package and is available from | |
d673b74e | 92 | https://www.kernel.org/pub/linux/utils/util-linux/. |