podman-mount(1)
π podman-mount β bestie edition
okay so real quick: this is podman-mount(1), from the General Commands Manual, and it's literally the glow-up your container's root filesystem has been waiting for. let's get into it β¨
πΈ NAME πΈ
podman-mount β mount a working container's root filesystem. that's it, that's the whole vibe. π
β¨ SYNOPSIS β¨
podman mount [options] [container ...]
podman container mount [options] [container ...]
two ways to say the same thing, both iconic, pick your fighter π«Ά
π¦ DESCRIPTION π¦
So basically: it mounts the root file system of the container(s) you specify somewhere the host can actually reach, and then it tells you where that spot is. that's the tea. β
Now β if you run this command with no arguments at all, Podman is gonna list out every currently mounted container, and yes that includes external containers. what's an external container, you ask? it's a container sitting in container/storage that got put there by some tool that is not Podman. examples given: Buildah and CRI-O. they're valid, they're just not ours, no cap. π
β οΈ rootless mode tea: rootless mode only supports mounting the VFS driver, unless you're running Podman inside the user namespace via the podman unshare command. every other storage driver fails to mount. that's not a skill issue, that's just how it is, don't @ me. π
π« RETURN VALUE π«
- the location of the mounted file system π
- on error: an empty string and errno get returned. sad girl hours, fr fr. π
π OPTIONS π
--all,-aβ mount all the podman containers. (external containers do not get mounted, they're not invited to this party π)--format=formatβ print the mounted containers in the format you specify (json is the one mentioned here). β¨--latest,-lβ instead of typing out a container name or ID, just grab the last created container. π«Ά- > β οΈ heads up bestie: the last started container can be from other users of Podman on the host machine. sharing is caring but also sharing is chaos.
- > also: this option is not available with the remote Podman client, which includes Mac and Windows machines (excluding WSL2). π
--no-truncβ do not truncate the output (defaultfalse). let it be long, let it breathe, main character energy. π
π EXAMPLES π
rootful mode, mounting a specific container π
# podman mount c831414b10a3
/var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged
look at that path. gorgeous. π
rootless mode: mounting only works from inside the user namespace π
$ podman unshare
# podman mount affectionate_mcnulty
/home/dwalsh/.local/share/containers/storage/overlay/4218326b9a80619aef005ff95067f76687ad975ce101c176598fb416f6186906/merged
shoutout to affectionate_mcnulty, she's doing great. π§
listing the currently mounted containers π¦
podman mount
c831414b10a3 /var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged
a7060253093b /var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged
two whole containers, thriving, no notes. β
mounting multiple containers at once π₯
podman mount c831414b10a3 a7060253093b
/var/lib/containers/storage/overlay/f3ac502d97b5681989dff84dfedc8354239bcecbdc2692f9a639f4e080a02364/merged
/var/lib/containers/storage/overlay/0ff7d7ca68bed1ace424f9df154d2dd7b5a125c19d887f17653cbcd5b6e30ba1/merged
she ate and left no crumbs. π
π SEE ALSO π
podman(1), podman-unmount(1), podman-unshare(1), mount(8)
go read your friends too, they're all slay. π
and that's the whole page bestie!! podman-mount(1), living in the General Commands Manual, signed off with podman-mount(1) at the bottom like a little autograph. stay mounted, stay unbothered. π
β¨ππ¦
π¦ where this page comes from
- alpine 3.24: podman-doc 5.8.9-r0 Β· Apache-2.0
- arch rolling: podman 6.1.4-1 Β· Apache-2.0
- centos-stream 10: podman 7:6.1.0-2.el10 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- centos-stream 9: podman 6:5.8.5-2.el9 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 43: podman 5:5.6.2-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 43: podman 5:5.8.4-1.fc43
- fedora 43: podman 5:5.8.8-1.fc43
- fedora 43: podman 5:5.8.9-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman 5:5.8.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman 5:5.8.7-1.fc44
- fedora 44: podman 5:5.8.9-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- nixos 26.05: podman 5.8.9
- nixpkgs unstable: podman 6.1.4
- ubuntu resolute: podman 5.7.0+ds2-3build1 Β· Apache-2.0
- ubuntu stonking: podman 5.8.6+ds1-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms