2015-02-02 12:34:26 -05:00
|
|
|
.Dd February 2, 2015
|
|
|
|
.Dt UNSHARE 1
|
|
|
|
.Os ubase
|
|
|
|
.Sh NAME
|
|
|
|
.Nm unshare
|
|
|
|
.Nd run program with some namespaces unshared from parent
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl muinpU
|
|
|
|
.Ar cmd
|
|
|
|
.Op Ar args...
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
unshares the indicated namespaces from the parent process and then executes
|
|
|
|
the specified program. The namespaces to be unshared are indicated via
|
|
|
|
options.
|
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl i
|
|
|
|
Unshare the System V IPC namespace, so that the calling process has a
|
|
|
|
private copy of the System V IPC namespace which is not shared with
|
|
|
|
any other process. This flag has the same effect as the
|
|
|
|
.Xr clone 2
|
|
|
|
.Dv CLONE_NEWIPC
|
|
|
|
flag.
|
|
|
|
.It Fl m
|
2014-04-12 13:13:34 -04:00
|
|
|
Unshare the mount namespace, so that the calling process has a private
|
|
|
|
copy of its namespace which is not shared with any other process.
|
2015-02-02 12:34:26 -05:00
|
|
|
This flag has the same effect as the
|
|
|
|
.Xr clone 2
|
|
|
|
.Dv CLONE_NEWNS
|
2014-04-14 04:27:20 -04:00
|
|
|
flag.
|
2015-02-02 12:34:26 -05:00
|
|
|
.It Fl n
|
2014-04-12 13:13:34 -04:00
|
|
|
Unshare the network namespace, so that the calling process is moved
|
|
|
|
into a new network namespace which is not shared with any previously
|
2015-02-02 12:34:26 -05:00
|
|
|
existing process. This flag has the same effect as the
|
|
|
|
.Xr clone 2
|
|
|
|
.Dv CLONE_NEWNET
|
|
|
|
flag.
|
|
|
|
.It Fl u
|
|
|
|
Unshare the UTS IPC namespace, so that the calling process has a
|
|
|
|
private copy of the UTS namespace which is not shared with any other
|
|
|
|
process. This flag has the same effect as the
|
|
|
|
.Xr clone 2
|
|
|
|
.Dv CLONE_NEWUTS
|
|
|
|
flag.
|
|
|
|
.It Fl p
|
2014-04-13 17:13:58 -04:00
|
|
|
Create the process in a new PID namespace. This flag has the same
|
2015-02-02 12:34:26 -05:00
|
|
|
effect as the
|
|
|
|
.Xr clone 2
|
|
|
|
.Dv CLONE_NEWPID
|
|
|
|
flag.
|
|
|
|
.It Fl U
|
2014-04-12 13:13:34 -04:00
|
|
|
The process will have a distinct set of UIDs, GIDs and capabilities.
|
2015-02-02 12:34:26 -05:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr clone 2 ,
|
|
|
|
.Xr unshare 2
|