mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-30 17:41:40 +00:00
18 lines
522 B
Plaintext
18 lines
522 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, linux]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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}}`
|