[PATCH 1/2] unshare: add some examples

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



...and fix one typo.

Signed-off-by: Lubomir Rintel <lkundrak@xxxxx>
---
 sys-utils/unshare.1 | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/sys-utils/unshare.1 b/sys-utils/unshare.1
index 1aa9bcb..3f9eccd 100644
--- a/sys-utils/unshare.1
+++ b/sys-utils/unshare.1
@@ -1,5 +1,5 @@
 .\" Process this file with
-.\" groff -man -Tascii lscpu.1
+.\" groff -man -Tascii unshare.1
 .\"
 .TH UNSHARE 1 "July 2014" "util-linux" "User Commands"
 .SH NAME
@@ -91,6 +91,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),
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux