summaryrefslogtreecommitdiffstats
path: root/sys-utils/unshare.1
diff options
context:
space:
mode:
authorLaurent Vivier2018-10-05 13:09:29 +0200
committerKarel Zak2018-11-12 11:52:14 +0100
commitbf8834d4f43e39c4212e1974cee4a76c1a8ba545 (patch)
tree995b4b8f0e00579251d37348a502142d97b2def0 /sys-utils/unshare.1
parentagetty: fix output of escaped characters (diff)
downloadkernel-qcow2-util-linux-bf8834d4f43e39c4212e1974cee4a76c1a8ba545.tar.gz
kernel-qcow2-util-linux-bf8834d4f43e39c4212e1974cee4a76c1a8ba545.tar.xz
kernel-qcow2-util-linux-bf8834d4f43e39c4212e1974cee4a76c1a8ba545.zip
unshare: allow to set a new root
This patch instroduces two new parameters to set the new root and the new working directory in this new root. This allows to combine "unshare chroot" in one command, and doing like this the /proc filesystem is correctly mounted in the new root with "--mount-proc". The new parameters are -R, --root and -w, --wd. The names are the same as for nsenter, except for "-r" that is already used by "--map-root-user" and replaced by "-R". Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'sys-utils/unshare.1')
-rw-r--r--sys-utils/unshare.16
1 files changed, 6 insertions, 0 deletions
diff --git a/sys-utils/unshare.1 b/sys-utils/unshare.1
index 746c41152..40cbedbd1 100644
--- a/sys-utils/unshare.1
+++ b/sys-utils/unshare.1
@@ -186,6 +186,12 @@ the GID map becomes writable by unprivileged processes when
.BR \%setgroups (2)
is permanently disabled (with \fBdeny\fR).
.TP
+.BR \-R, "\-\-root=\fIdir"
+run the command with root directory set to \fIdir\fP.
+.TP
+.BR \-w, "\-\-wd=\fIdir"
+change working directory to \fIdir\fP.
+.TP
.BR \-V , " \-\-version"
Display version information and exit.
.TP