Linux namespaces allow one to have different mounts for different namespaces. How can I list all mounts of all namespaces?
I have found /proc/*/ns/mnt, but I am not sure what to do with those.
Linux namespaces allow one to have different mounts for different namespaces. How can I list all mounts of all namespaces?
I have found /proc/*/ns/mnt, but I am not sure what to do with those.
tail -n +1 -- /proc/*/mounts
is per process, but it gets the job doneYou can list all the mount namespaces (constraining the output by
-o PID
to only display process IDs; using raw output with-r
; and skipping header with-n
) and then show the contents of/proc/$PID/mounts
for each namespace: