From 39afceec309ca682be04d18d1e6e4fee4e77276e Mon Sep 17 00:00:00 2001 From: Julia Evans Date: Sun, 8 May 2022 17:26:45 -0400 Subject: [PATCH] nsenter: add --all example and refresh (#8003) --- pages/linux/nsenter.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pages/linux/nsenter.md b/pages/linux/nsenter.md index 06290c52c2..79c45824fc 100644 --- a/pages/linux/nsenter.md +++ b/pages/linux/nsenter.md @@ -2,16 +2,20 @@ > Run a new command in a running process' namespace. > Particularly useful for docker images or chroot jails. -> More information: . +> More information: . -- Run command in existing processes network namespace: +- Run a specific command using the same namespaces as an existing process: -`nsenter -t {{pid}} -n {{command}} {{command_arguments}}` +`nsenter --target {{pid}} --all {{command}} {{command_arguments}}` -- Run a new command in an existing processes ps-table namespace: +- Run a specific command in an existing process's network namespace: -`nsenter -t {{pid}} -p {{command}} {{command_arguments}}` +`nsenter --target {{pid}} --net {{command}} {{command_arguments}}` -- Run command in existing processes IPC namespace: +- Run a specific command in an existing process's PID namespace: -`nsenter -t {{pid}} -i {{command}} {{command_arguments}}` +`nsenter --target {{pid}} --pid {{command}} {{command_arguments}}` + +- Run a specific command in an existing process's IPC namespace: + +`nsenter --target {{pid}} --ipc {{command}} {{command_arguments}}`