util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] unshare: add some examples
@ 2014-12-28 20:23 Lubomir Rintel
  2014-12-28 20:23 ` [PATCH 2/2] unshare: allow persisting namespaces Lubomir Rintel
  2015-01-12 11:41 ` [PATCH 1/2] unshare: add some examples Karel Zak
  0 siblings, 2 replies; 8+ messages in thread
From: Lubomir Rintel @ 2014-12-28 20:23 UTC (permalink / raw)
  To: util-linux; +Cc: Mikhail Gusarov, Lubomir Rintel

...and fix one typo.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-02-15 12:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-28 20:23 [PATCH 1/2] unshare: add some examples Lubomir Rintel
2014-12-28 20:23 ` [PATCH 2/2] unshare: allow persisting namespaces Lubomir Rintel
2015-01-06 13:03   ` Karel Zak
2015-01-06 17:11     ` Eric W. Biederman
2015-01-06 17:21       ` Karel Zak
2015-01-06 17:44         ` Eric W. Biederman
2015-02-15 12:10   ` Mike Frysinger
2015-01-12 11:41 ` [PATCH 1/2] unshare: add some examples Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).