Merge pull request #21702 from rhatdan/docs31

[CI:DOCS] Fix up example description of podman-unshare.1.md
This commit is contained in:
openshift-merge-bot[bot]
2024-02-19 11:34:45 +00:00
committed by GitHub

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