nsenter: add namespaces examples (#8084)

add examples for multiple namespaces, procfs specified namespace
htop
Adrien Thebo 2022-05-18 16:35:46 -07:00 committed by GitHub
parent ab5154719a
commit 59e789fc73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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}}`