github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/docs/source/markdown/podman-unshare.1.md (about) 1 % podman-unshare(1) 2 3 ## NAME 4 podman\-unshare - Run a command inside of a modified user namespace 5 6 ## SYNOPSIS 7 **podman unshare** [*--*] [*command*] 8 9 ## DESCRIPTION 10 Launches a process (by default, *$SHELL*) in a new user namespace. The user 11 namespace is configured so that the invoking user's UID and primary GID appear 12 to be UID 0 and GID 0, respectively. Any ranges which match that user and 13 group in `/etc/subuid` and `/etc/subgid` are also mapped in as themselves with the 14 help of the *newuidmap(1)* and *newgidmap(1)* helpers. 15 16 **podman unshare** is useful for troubleshooting unprivileged operations and for 17 manually clearing storage and other data related to images and containers. 18 19 It is also useful if you want to use the **podman mount** command. If an unprivileged user wants to mount and work with a container, then they need to execute 20 **podman unshare**. Executing **podman mount** fails for unprivileged users unless the user is running inside a **podman unshare** session. 21 22 The unshare session defines two environment variables: 23 24 - **CONTAINERS_GRAPHROOT**: the path to the persistent container's data. 25 - **CONTAINERS_RUNROOT**: the path to the volatile container's data. 26 27 ## EXAMPLE 28 29 ``` 30 $ podman unshare id 31 uid=0(root) gid=0(root) groups=0(root),65534(nobody) 32 33 $ podman unshare cat /proc/self/uid_map /proc/self/gid_map 34 0 1000 1 35 1 10000 65536 36 0 1000 1 37 1 10000 65536 38 ``` 39 40 41 ## SEE ALSO 42 podman(1), podman-mount(1), namespaces(7), newuidmap(1), newgidmap(1), user\_namespaces(7)