unshare: add example and sudo (#22324)

This commit is contained in:
Managor
2026-05-06 14:39:24 +03:00
committed by GitHub
parent f01def6f96
commit 5e8dee145c
+6 -2
View File
@@ -3,10 +3,14 @@
> Execute a command in new user-defined namespaces.
> More information: <https://manned.org/unshare>.
- Execute the default shell:
`unshare`
- Execute a command without sharing access to connected networks:
`unshare {{[-n|--net]}} {{command}} {{command_arguments}}`
`sudo unshare {{[-n|--net]}} {{command}} {{argument1 argument2 ...}}`
- Execute a command as a child process without sharing mounts, processes, or networks:
`unshare {{[-m|--mount]}} {{[-i|--pid]}} {{[-n|--net]}} {{[-f|--fork]}} {{command}} {{command_arguments}}`
`sudo unshare {{[-minf|--mount --pid --net --fork]}} {{command}} {{argument1 argument2 ...}}`