]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
unshare: add some examples
authorLubomir Rintel <lkundrak@v3.sk>
Sun, 28 Dec 2014 20:23:37 +0000 (21:23 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Jan 2015 11:41:02 +0000 (12:41 +0100)
...and fix one typo.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/unshare.1

index ab0614efdac2c604d3e60567079b2634dcd2de8e..0ef43a1c961270c1a9b46f0d9e4c7897242a78e8 100644 (file)
@@ -103,6 +103,20 @@ Display version information and exit.
 .TP
 .BR \-h , " \-\-help"
 Display help text and exit.
+.SH EXAMPLES
+.TP
+.B # unshare --fork --pid --mount-proc readlink /proc/self
+.TQ
+1
+.br
+Establish a PID namespace, ensure we're PID 1 in it against newly mounted
+procfs instance.
+.TP
+.B $ unshare --map-root-user --user sh -c whoami
+.TQ
+root
+.br
+Establish a user namespace as an unprivileged user with a root user within it.
 .SH SEE ALSO
 .BR unshare (2),
 .BR clone (2),