lsns — list namespaces
lsns [options]
[namespace]
lsns lists
information about all the currently accessible namespaces or
about the given namespace. The namespace identifier is an
inode number.
The default output is subject to change. So whenever
possible, you should avoid using default outputs in your
scripts. Always explicitly define expected columns by using
the −−output option
together with a columns list in environments where a stable
output is required.
The NSFS column, printed
when net is
specified for the −−type option, is special; it
uses multi-line cells. Use the option −−nowrap to switch to
","-separated single-line representation.
Note that lsns reads information directly from the /proc filesystem and for non-root users it may return incomplete information. The current /proc filesystem may be unshared and affected by a PID namespace (see unshare −−mount−proc for more details). lsns is not able to see persistent namespaces without processes where the namespace instance is held by a bind mount to /proc/pid/ns/type.
−J,
−−jsonUse JSON output format.
−l,
−−listUse list output format.
−n,
−−noheadingsDo not print a header line.
−o,
−−output listSpecify which output columns to print. Use
−−help to get a
list of all supported columns.
The default list of columns may be extended if
list is
specified in the format +list (e.g.,
lsns −o
+PATH).
−−output−allOutput all available columns.
−p,
−−task pidDisplay only the namespaces held by the process with this pid.
−r,
−−rawUse the raw output format.
−t,
−−type typeDisplay the specified type of namespaces only. The supported types are mnt, net, ipc, user, pid, uts, cgroup and time. This option may be given more than once.
−u,
−−notruncateDo not truncate text in columns.
−W,
−−nowrapDo not use multi-line text in columns.
−V,
−−versionDisplay version information and exit.
−h,
−−helpDisplay help text and exit.