Container Basics On Linux (Namespaces/Cgroups)
Stop thinking you need Docker to inspect process namespaces
đź§© The Challenge
You’re digging through a server and see a process doing something weird, but you can’t tell if it’s a containerized task or just a background cron job. Trying to grep through ps aux just gives you a migraine.
đź’ˇ The Fix
Peek directly into the proc filesystem to see exactly what namespaces a process is locked into without needing the container runtime to tell you. It’s the fastest way to confirm if that process thinks it’s alone in the world.
ls -l /proc/$(pgrep -u appuser your_process)/ns/
⚙️ Why It Works
The kernel keeps these symbolic links for every running process, mapping them to the specific namespace handles they use for network, PID, mount, and IPC separation. Viewing them directly cuts through the abstraction layer and shows you the raw kernel state.
🚀 Pro-Tip: Use readlink to quickly compare namespace IDs between two processes to see if they’re actually running in the same sandbox.
Linux Tips & Tricks | © ngelinux.com | 11/20/2026
