unshare: add complete container example and fix example (#23648)

This commit is contained in:
Managor
2026-08-23 23:16:10 +03:00
committed by GitHub
parent b18a9a340b
commit b287fc5df9
+5 -1
View File
@@ -13,4 +13,8 @@
- Execute a command as a child process without sharing mounts, processes, or networks: - Execute a command as a child process without sharing mounts, processes, or networks:
`sudo unshare {{[-minf|--mount --pid --net --fork]}} {{command}} {{argument1 argument2 ...}}` `sudo unshare {{[-mpnf|--mount --pid --net --fork]}} {{command}} {{argument1 argument2 ...}}`
- Create a container manually:
`sudo unshare {{[-puinmf|--pid --uts --ipc --net --mount --fork]}} chroot {{path/to/new_root}} {{/bin/sh}}`