1
2LSNS(8) System Administration LSNS(8)
3
4
5
7 lsns - list namespaces
8
10 lsns [options] [namespace]
11
12
14 lsns lists information about all the currently accessible namespaces or
15 about the given namespace. The namespace identifier is an inode num‐
16 ber.
17
18 The default output is subject to change. So whenever possible, you
19 should avoid using default outputs in your scripts. Always explicitly
20 define expected columns by using the --output option together with a
21 columns list in environments where a stable output is required.
22
23 NSFS column, printed when net is specified for --type option, is spe‐
24 cial; it uses multi-line cells. Use the option --nowrap is for switch‐
25 ing to "," separated single-line representation.
26
27 Note that lsns reads information directly from the /proc filesystem and
28 for non-root users it may return incomplete information. The current
29 /proc filesystem may be unshared and affected by a PID namespace (see
30 unshare --mount-proc for more details). lsns is not able to see per‐
31 sistent namespaces without processes where the namespace instance is
32 held by a bind mount to /proc/pid/ns/type.
33
34
36 -J, --json
37 Use JSON output format.
38
39 -l, --list
40 Use list output format.
41
42 -n, --noheadings
43 Do not print a header line.
44
45 -o, --output list
46 Specify which output columns to print. Use --help to get a list
47 of all supported columns.
48
49 The default list of columns may be extended if list is specified
50 in the format +list (e.g. lsns -o +PATH).
51
52 -p, --task pid
53 Display only the namespaces held by the process with this pid.
54
55 -r, --raw
56 Use the raw output format.
57
58 -t, --type type
59 Display the specified type of namespaces only. The supported
60 types are mnt, net, ipc, user, pid, uts and cgroup. This option
61 may be given more than once.
62
63 -u, --notruncate
64 Do not truncate text in columns.
65
66 -W, --nowrap
67 Do not use multi-line text in columns.
68
69 -V, --version
70 Display version information and exit.
71
72 -h, --help
73 Display help text and exit.
74
75
77 Karel Zak <kzak@redhat.com>
78
79
81 nsenter(1), unshare(1), clone(2), namespaces(7)
82
83
85 The lsns command is part of the util-linux package and is available
86 from https://www.kernel.org/pub/linux/utils/util-linux/.
87
88
89
90util-linux December 2015 LSNS(8)