Peek at what namespaces your processes are hiding in
Container Basics On Linux (Namespaces/Cgroups)
Peek at what namespaces your processes are hiding in
🧩 The Challenge
You’ve got a container acting like a total weirdo and you can’t figure out if it’s actually isolated or if it’s leaking into the host’s network stack. I’ve spent way too many Friday afternoons staring at `ps` output trying to guess which process belongs to which container.
💡 The Fix
Just peek directly into the proc filesystem to see the inode numbers for the namespaces, which tells you exactly who is sharing what. It’s the fastest way to verify isolation without digging through a dozen layers of orchestration configs.
ls -l /proc/<PID>/ns/
⚙️ Why It Works
Each entry in that directory is a symbolic link pointing to a specific namespace identifier; if two processes have the same inode number for a namespace, they are absolutely living in the same sandbox.
🚀 Pro-Tip: Pipe it into readlink if you just want the raw inode number for a quick script comparison.
Linux Tips & Tricks | © ngelinux.com | 12/1/2026
