1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-09-08 13:53:27 +02:00
tldr/pages/linux/nsenter.md
2022-05-08 18:26:45 -03:00

21 lines
721 B
Markdown

# nsenter
> Run a new command in a running process' namespace.
> Particularly useful for docker images or chroot jails.
> More information: <https://manned.org/nsenter>.
- Run a specific command using the same namespaces as an existing process:
`nsenter --target {{pid}} --all {{command}} {{command_arguments}}`
- Run a specific command in an existing process's network namespace:
`nsenter --target {{pid}} --net {{command}} {{command_arguments}}`
- Run a specific command in an existing process's PID namespace:
`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}}`