.nh .TH podman\-unshare(1) .SH NAME .PP podman\-unshare \- Run a command inside of a modified user namespace .SH SYNOPSIS .PP \fBpodman unshare\fP [\fI\-\-\fP] [\fIcommand\fP] .SH DESCRIPTION .PP Launches a process (by default, \fI$SHELL\fP) in a new user namespace. The user namespace is configured so that the invoking user's UID and primary GID appear to be UID 0 and GID 0, respectively. Any ranges which match that user and group in \fB\fC/etc/subuid\fR and \fB\fC/etc/subgid\fR are also mapped in as themselves with the help of the \fInewuidmap(1)\fP and \fInewgidmap(1)\fP helpers. .PP \fBpodman unshare\fP is useful for troubleshooting unprivileged operations and for manually clearing storage and other data related to images and containers. .PP It is also useful if you want to use the \fBpodman mount\fP command. If an unprivileged user wants to mount and work with a container, then they need to execute \fBpodman unshare\fP\&. Executing \fBpodman mount\fP fails for unprivileged users unless the user is running inside a \fBpodman unshare\fP session. .PP The unshare session defines two environment variables: .RS .IP \(bu 2 \fBCONTAINERS\_GRAPHROOT\fP: the path to the persistent container's data. .IP \(bu 2 \fBCONTAINERS\_RUNROOT\fP: the path to the volatile container's data. .RE .SH EXAMPLE .PP .RS .nf $ podman unshare id uid=0(root) gid=0(root) groups=0(root),65534(nobody) $ podman unshare cat /proc/self/uid\_map /proc/self/gid\_map 0 1000 1 1 10000 65536 0 1000 1 1 10000 65536 .fi .RE .SH SEE ALSO .PP podman(1), podman\-mount(1), namespaces(7), newuidmap(1), newgidmap(1), user\_namespaces(7)