Site icon New Generation Enterprise Linux

Stop guessing which namespace your process is stuck in

Container Basics On Linux (Namespaces/Cgroups)

Stop guessing which namespace your process is stuck in

đź§© The Challenge

Dealing with a container that isn’t talking to the network or seeing the right files is a nightmare when you’re just looking at process lists. You end up blind to why the app inside feels like it’s in a parallel universe.

đź’ˇ The Fix

Use the lsns command to map out who is living in which namespace. It’s the easiest way to see if your process ID is actually grouped where you think it is.

lsns -p <PID>

⚙️ Why It Works

This utility walks through the proc filesystem to list the specific namespaces a process is currently occupying, showing you the unique IDs for network, mount, and UTS spaces. It saves you from guessing if you’ve entered the wrong sandbox during a debug session.

🚀 Pro-Tip: Run it with -o to filter for just the namespace types you actually care about.

Linux Tips & Tricks | © ngelinux.com | 9/15/2026

0 0 votes
Article Rating
Exit mobile version