newpid1
Launch a command in a new pid namespace
Usage
newpid [-inNu]
command
Overview
newpid uses the clone(CLONE_NEWPID) syscall to launch a command in a new PID namespace. The /proc filesystem is remounted so the new process IDs are also visible there.
Options
-
-i -
Use
CLONE_NEWIPCto run in a new IPC namespace.
-
-n -
Use
CLONE_NEWNETto run in a new network namespace.
-
-N newpidname -
Use
CLONE_NEWNETto run in a new network namespace, and join an existing network namespace. The name must start withnewpid.
-
-u -
Use
CLONE_NEWUTSto run in a new UTS namespace.
Examples
$ newpid ps auxUSER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMANDmyon 1 0.0 0.0 4080 84 pts/3 S+ 12:15 0:00 newpid ps auxmyon 2 0.0 0.0 19984 1316 pts/3 R+ 12:15 0:00 ps aux$ ./newpid -n ip link1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group defaultlink/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
Releases
6 releases since Debian 8 (Jessie); the text changed 4 times.
-N since Debian 9 (Stretch);
-i since Debian 9 (Stretch);
-n since Debian 9 (Stretch);
-u since Debian 9 (Stretch).