Linux namespaces, including PID namespaces, are one of the key technologies that enable containers to run in isolated environments. I published a video that covers an Overview of How Containers Use PID Namespaces to Provide Process Isolation. This video digs in deep to cover this complex topic with lots of demonstrations.
This video describes how containers work under the hood, and it supplements the pid_namespaces manual page (man pid_namespaces) with demonstrations and step-by-step explanations of the behavior of PID namespaces.
These topics are covered:
- Using the lsns command to view PID namespaces
- Displaying which PID namespace processes are running with the ps -e -o pidns,pid,args command
- Using the unshare command to create a PID namespace
- The process isolation that PID namespaces provide
- Processes from a parent namespace, and why processes have different PID numbers in the parent namespace
- Duplicate PIDs in different namespaces
- PID mapping between different PID namespaces with the /proc/<pid>/status file and use at the NSpid attribute
- Run a container with podman and view the PID namespace created
After watching this video, you should better understand how PID namespaces work and the benefits they provide.
[ Getting started with containers? Check out this free course. Deploying containerized applications: A technical overview. ]
About the author
Brian Smith is a product manager at Red Hat focused on RHEL automation and management. He has been at Red Hat since 2018, previously working with public sector customers as a technical account manager (TAM).
Browse by channel
Automation
The latest on IT automation for tech, teams, and environments
Artificial intelligence
Updates on the platforms that free customers to run AI workloads anywhere
Open hybrid cloud
Explore how we build a more flexible future with hybrid cloud
Security
The latest on how we reduce risks across environments and technologies
Edge computing
Updates on the platforms that simplify operations at the edge
Infrastructure
The latest on the world’s leading enterprise Linux platform
Applications
Inside our solutions to the toughest application challenges
Original shows
Entertaining stories from the makers and leaders in enterprise tech
Products
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Cloud services
- See all products
Tools
- Training and certification
- My account
- Customer support
- Developer resources
- Find a partner
- Red Hat Ecosystem Catalog
- Red Hat value calculator
- Documentation
Try, buy, & sell
Communicate
About Red Hat
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
Select a language
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit