From 59e789fc735d95c187d297139d7b7ff6eb0bf4db Mon Sep 17 00:00:00 2001 From: Adrien Thebo Date: Wed, 18 May 2022 16:35:46 -0700 Subject: [PATCH] nsenter: add namespaces examples (#8084) add examples for multiple namespaces, procfs specified namespace --- pages/linux/nsenter.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/linux/nsenter.md b/pages/linux/nsenter.md index 79c45824f..309b0d502 100644 --- a/pages/linux/nsenter.md +++ b/pages/linux/nsenter.md @@ -19,3 +19,11 @@ - Run a specific command in an existing process's IPC namespace: `nsenter --target {{pid}} --ipc {{command}} {{command_arguments}}` + +- Run a specific command in an existing process's UTS, time, and IPC namespaces: + +`nsenter --target {{pid}} --uts --time --ipc -- {{command}} {{command_arguments}}` + +- Run a specific command in an existing process's namespace by referencing procfs: + +`nsenter --pid=/proc/{{pid}}/pid/net -- {{command}} {{command_arguments}}`