Scroll to navigation

LSNS(8) System Administration LSNS(8)

NAME

lsns - list namespaces

SYNOPSIS

lsns [options] [namespace]

DESCRIPTION

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.

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.

OPTIONS

Use list output format.
Do not print a header line.
Specify 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).

Display only the namespaces held by the process with this pid.
Use the raw output format.
Display the specified type of namespaces only. The supported types are mnt, net, ipc, user, pid and uts. This option may be given more than once.
Do not truncate text in columns.
Display version information and exit.
Display help text and exit.

AUTHORS

Karel Zak <kzak@redhat.com>

SEE ALSO

unshare(1), nsenter(1), clone(2)

AVAILABILITY

The lsns command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.

December 2015 util-linux