mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 20:11:19 +08:00
unshare: add example and sudo (#22324)
This commit is contained in:
@@ -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 ...}}`
|
||||
|
||||
Reference in New Issue
Block a user