lsns
The lsns command line tool is used to display information about various namespaces in Linux systems. It stands for "list namespaces" and is a part of the util-linux package. When executed, it provides a list of existing namespaces along with their unique identifiers, types, and associated process IDs. The available namespace types include network, process, IPC, UTS (Unix Timesharing System), mount, user, and cgroup. Each namespace represents a virtual environment that isolates specific system resources for processes. The lsns command can be helpful in understanding the namespace configuration of a Linux system and tracking processes associated with different namespaces. It is typically used by system administrators, developers, and power users working with containerization technologies or managing various namespaces in a Linux environment.
List of commands for lsns:
-
lsns:tldr:b8d2d lsns: List the specified type of namespaces only.$ lsns --typetry on your machineexplain this command
-
lsns:tldr:d758a lsns: List namespaces, only showing the namespace ID, type, PID, and command.$ lsns --output NS,TYPE,PID,COMMANDtry on your machineexplain this command
-
lsns:tldr:d9c92 lsns: List namespaces in JSON format.$ lsns --jsontry on your machineexplain this command
-
lsns:tldr:dfa5f lsns: List namespaces associated with {{pid}}.$ lsns --task ${pid}try on your machineexplain this command