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