Site icon New Generation Enterprise Linux

Peek at container process isolation without installing extra tools

Container Basics On Linux (Namespaces/Cgroups)

Peek at container process isolation without installing extra tools

🧩 The Challenge

You are trying to figure out why a containerized process can’t see the rest of your network stack, but you don’t want to install nsenter or debug tools inside the container itself. Most people start hacking on Docker or Kubernetes commands, but you can just look at the host kernel state if you know where the files live.

💡 The Fix

Use the proc filesystem to compare the namespace inodes directly from your host shell. It is the fastest way to confirm if two processes are actually living in the same world or if your container runtime is playing tricks on you.

ls -l /proc/<pid>/ns/net

⚙️ Why It Works

Linux keeps a symlink in the proc directory for every namespace type, and if the inode numbers match between two processes, they are sharing that exact namespace. Looking at these symlinks is the source of truth for what the kernel is actually doing.

🚀 Pro-Tip: Pipe it into readlink to grab the inode number quickly for a side-by-side script comparison.

Linux Tips & Tricks | © ngelinux.com | 11/21/2026

0 0 votes
Article Rating
Exit mobile version