1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 10:42:07 +02:00
tldr/pages/linux/unshare.md
2022-04-02 19:19:56 -03:00

12 lines
430 B
Markdown

# unshare
> Execute a command in new user-defined namespaces.
> More information: <https://www.kernel.org/doc/html/latest/userspace-api/unshare.html>.
- Execute a command without sharing access to connected networks:
`unshare --net {{command}} {{command_arguments}}`
- Execute a command as a child process without sharing mounts, processes, or networks:
`unshare --mount --pid --net --fork {{command}} {{command_arguments}}`