1LSNS(8)                      System Administration                     LSNS(8)
2
3
4

NAME

6       lsns - list namespaces
7

SYNOPSIS

9       lsns [options] namespace
10

DESCRIPTION

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 output mode (--tree or --list) and columns by using the
18       --output option together with a columns list in environments where a
19       stable output is required.
20
21       The NSFS column, printed when net is specified for the --type option,
22       is special; it uses multi-line cells. Use the option --nowrap to switch
23       to ","-separated single-line representation.
24
25       Note that lsns reads information directly from the /proc filesystem and
26       for non-root users it may return incomplete information. The current
27       /proc filesystem may be unshared and affected by a PID namespace (see
28       unshare --mount-proc for more details). lsns is not able to see
29       persistent namespaces without processes where the namespace instance is
30       held by a bind mount to /proc/pid/ns/type.
31

OPTIONS

33       -J, --json
34           Use JSON output format.
35
36       -l, --list
37           Use list output format.
38
39       -n, --noheadings
40           Do not print a header line.
41
42       -o, --output list
43           Specify which output columns to print. Use --help to get a list of
44           all supported columns.
45
46           The default list of columns may be extended if list is specified in
47           the format +list (e.g., lsns -o +PATH).
48
49       --output-all
50           Output all available columns.
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 types
60           are mnt, net, ipc, user, pid, uts, cgroup and time. This option may
61           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       -T, --tree rel
70           Use tree-like output format. If process is given as rel, print
71           process tree(s) in each name space. This is default when --tree is
72           not specified. If parent is given, print tree(s) constructed by the
73           parent/child relationship. If owner is given, print tree(s)
74           constructed by the owner/owned relationship. owner is used as
75           default when rel is omitted.
76
77       -h, --help
78           Display help text and exit.
79
80       -V, --version
81           Print version and exit.
82

AUTHORS

84       Karel Zak <kzak@redhat.com>
85

SEE ALSO

87       nsenter(1), unshare(1), clone(2), namespaces(7), ioctl_ns(2),
88       ip-netns(8)
89

REPORTING BUGS

91       For bug reports, use the issue tracker at
92       https://github.com/util-linux/util-linux/issues.
93

AVAILABILITY

95       The lsns command is part of the util-linux package which can be
96       downloaded from Linux Kernel Archive
97       <https://www.kernel.org/pub/linux/utils/util-linux/>.
98
99
100
101util-linux 2.38.1                 2022-07-20                           LSNS(8)
Impressum