Fix up example description of podman-unshare.1.md

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2024-02-17 13:36:26 -05:00
parent fbb4d5dca6
commit 79a10419c0
No known key found for this signature in database
GPG Key ID: A2DF901DABE2C028
1 changed files with 8 additions and 0 deletions

View File

@ -69,16 +69,24 @@ the exit codes follow the `chroot` standard, see below:
## EXAMPLE
Execute specified command in rootless user namespace:
```
$ podman unshare id
uid=0(root) gid=0(root) groups=0(root),65534(nobody)
```
Show user namespace mappings for rootless containers:
```
$ podman unshare cat /proc/self/uid_map /proc/self/gid_map
0 1000 1
1 10000 65536
0 1000 1
1 10000 65536
```
Show rootless netns information in user namespace for rootless containers:
```
$ podman unshare --rootless-netns ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00