process ID
The number the kernel gives each running process so it can be told apart from all the others.
In more detail
Tools such as ps and top show it, and kill uses it to say which process should receive a signal. Numbers are reused after a process ends, so a saved process ID may later point at a different program.
Examples
Twelve-factor processes never write their PID to a file; the supervisor or platform that started them already tracks it.Process IDs start at 1 and count upwards, and numbers are reused after a process ends. Commands such as ps, kill and systemctl status work with them. Verify the PID, its owner and its parent immediately before signalling, because a stale number may now belong to another process.Volatility's process tree shows each process ID with its parent's ID.Related terms
- process — A program that is currently running, with its own memory and a numeric identifier.
- ps — The command that lists running processes with details such as process ID, CPU use and command name.
- kill — The command that sends a signal to a process or job, SIGTERM by default, despite its name.
- dollar dollar — The special parameter $$, which holds the process ID of the current shell.
- PID namespace — The namespace that decides which other processes a process can see and how they are numbered.
- init process — The first process started on a system or in a container, with process ID 1 and special duties.
- PID file — A file where a background program writes its own process ID so other tools can find it later.
- daemonize — To make a program detach itself and keep running in the background, traditionally by forking and exiting the original process.
- parent process — The process that started another process; every process except the first records its parent's PID.
Taught in
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation
- trap, Cleanup And Temporary Files — Bash Scripting & Command Line Automation
- Processes, Jobs And Signals — Bash Scripting & Command Line Automation
- Scheduling, Monitoring And A Script That Reports — Bash Scripting & Command Line Automation
- Container Images The Exam Way — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Pod Security Admission: Created, Never Started — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Immutable Containers: Read-Only At Runtime — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Port Binding And Concurrency — DevOps & Site Reliability Engineering
- Why Containers: Bare Metal, Machines And Processes — Docker Architecture & Production Containers
- Namespaces And Cgroups: Isolation And Limits — Docker Architecture & Production Containers
- CMD, ENTRYPOINT, USER And Process Signals — Docker Architecture & Production Containers
- What A Process Is — Linux Fundamentals & Systems Administration
- Signals, And What kill Really Sends — Linux Fundamentals & Systems Administration
- Job Control, And Processes That Outlive You — Linux Fundamentals & Systems Administration
- Production Hardening: Graceful Shutdown & Docker — Node.js Internals & Backend Services
- Memory Forensics: Process Trees & Injection — Security Operations & Threat Hunting (SOC)
- Images Sprint: Eight Questions On Builds, Tags And Registries — Docker Certified Associate (DCA) Exam Prep
- Root, But Not That Root: Default Engine Security And Image Scanning — Docker Certified Associate (DCA) Exam Prep
- Kernel Parameters: Now, At Boot, And Which File Wins — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Network Troubleshooting: The Ladder From Link To Port — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Storage Performance: Busy, Slow, Or Both — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Performance Triage: Processor, Memory Or Disk? — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Constraints: Limits, Control Groups And Listeners — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Disk Full At Three In The Morning — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Processes: Priorities, Monitors And Long Jobs — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
References
Certification courses
- CKAD course and practice exam: Certified Kubernetes Application Developer
- CKS course and practice exam: Certified Kubernetes Security Specialist
- DCA course and practice exam: Docker Certified Associate
- LFCS course and practice exam: Linux Foundation Certified System Administrator
- LPIC-1 course and practice exam: Linux Administrator (101-500 and 102-500)