From 5e8dee145c7f2aaca788686e4e848234329502b5 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Wed, 6 May 2026 14:39:24 +0300 Subject: [PATCH] unshare: add example and sudo (#22324) --- pages/linux/unshare.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/linux/unshare.md b/pages/linux/unshare.md index cd992b6e72..3b2c1f2b20 100644 --- a/pages/linux/unshare.md +++ b/pages/linux/unshare.md @@ -3,10 +3,14 @@ > Execute a command in new user-defined namespaces. > More information: . +- 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 ...}}`