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 Note that lsns reads information directly from the /proc filesystem and
24 for non-root users it may return incomplete information. The current
25 /proc filesystem may be unshared and affected by a PID namespace (see
26 unshare --mount-proc for more details). lsns is not able to see per‐
27 sistent namespaces without processes where the namespace instance is
28 held by a bind mount to /proc/pid/ns/type.
29
30
32 -l, --list
33 Use list output format.
34
35 -n, --noheadings
36 Do not print a header line.
37
38 -o, --output list
39 Specify which output columns to print. Use --help to get a list
40 of all supported columns.
41
42 The default list of columns may be extended if list is specified
43 in the format +list (e.g. lsns -o +PATH).
44
45 -p, --task pid
46 Display only the namespaces held by the process with this pid.
47
48 -r, --raw
49 Use the raw output format.
50
51 -t, --type type
52 Display the specified type of namespaces only. The supported
53 types are mnt, net, ipc, user, pid and uts. This option may be
54 given more than once.
55
56 -u, --notruncate
57 Do not truncate text in columns.
58
59 -V, --version
60 Display version information and exit.
61
62 -h, --help
63 Display help text and exit.
64
65
67 Karel Zak <kzak@redhat.com>
68
69
71 unshare(1), nsenter(1), clone(2)
72
73
75 The lsns command is part of the util-linux package and is available
76 from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
77
78
79
80util-linux December 2015 LSNS(8)