The process identity card
Think of Linux as a busy office. Every running task gets an ID card called a PID. If one task starts another task, the starter is the parent and the new task is the child. That parent is tracked using PPID.
ps CommandLearn what a Linux process is, how parent/child processes work, how to read ps output, and how to investigate real-world CPU, memory, and stuck-process situations.
Use these short narrated explanations after each concept. The goal is not just to listen, but to validate: โCan I explain this correctly without looking?โ
A simple explanation of running programs, PID, PPID, and why Linux tracks processes.
Explains why processes move between states and why not every strange state is automatically a problem.
Guides learners on checking expected output instead of blindly copying commands.
After every voice-over, the coach asks a small question. Learners can mark โI understood,โ ask for a repeat, or request a different analogy. This validates whether the concept landed instead of assuming listening means learning.
Add โprocess detective missionsโ where learners investigate slow CPU, high memory, zombie process, and wrong-user scenarios.
Add tiny memory hooks: PID = identity card, PPID = parent, STAT = mood, COMMAND = job description.
Add validation badges for learners who can predict, run, compare, and explain command output correctly.
A process is a running program. When you open a terminal, run ls, start nginx, or launch Firefox, Linux creates one or more processes.
Think of Linux as a busy office. Every running task gets an ID card called a PID. If one task starts another task, the starter is the parent and the new task is the child. That parent is tracked using PPID.
Process ID. Unique number for a running process.
Parent Process ID. Shows who started this process.
The Linux user account that owns the process.
Short code showing whether the process is running, sleeping, stopped, or zombie.
A process does not always run continuously. It may run, wait, sleep, stop, or finish. This is normal.
A command or application starts.
CPU is actively executing it.
Waiting for input, network, disk, timer, or event.
Paused by signal or job control.
Finished, but parent has not collected exit status yet.
psThe STAT column gives a quick health clue. Learn these five first.
Running now or ready to run.
Waiting normally. Very common.
Usually waiting on disk or I/O. Investigate if stuck.
Paused by signal or terminal job control.
Already exited, but parent has not cleaned it up.
ps commandps gives a snapshot of processes at that moment. It is like taking a photo of system activity.
ps versus topps shows a one-time snapshot. Use it when you want a clear command output you can filter, sort, copy, or save.
top shows live updating activity. Use it when you want to watch processes changing in real time.
ps โ current terminal processesps aux โ all processes, BSD styleps -ef โ all processes, full Unix styleps command simulatorClick a command. Watch sample output and read when to use it.
ps aux outputClick a column name to understand it. This removes the fear from large process output.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.2 168420 13520 ? Ss 09:10 0:03 /sbin/init jp 2417 2.8 3.4 952400 182140 ? Sl 10:22 1:11 firefox jp 3152 0.0 0.0 8784 3328 pts/0 R+ 10:31 0:00 ps aux
Process trees help you answer: โWho started this process?โ and โWhat will be affected if I stop it?โ
$ ps -ef --forest
Look at the PPID column. A child process points back to the PID of its parent process.
These are the practical situations beginners actually face on Linux servers and laptops.
Find top CPU users.
ps aux --sort=-%cpu | head
Find top memory users.
ps aux --sort=-%mem | head
Search by process name.
ps -ef | grep ssh
Show PID, PPID, state, and command.
ps -o pid,ppid,stat,etime,cmd -p PID
Run these on Ubuntu, Rocky Linux, RHEL, Fedora, Debian, or most modern Linux systems. No destructive command is used.
ps
bash or zsh and the ps command itself.ps -f
UID, PID, PPID, STIME, and CMD.ps -ef | head
root processes and PID 1.ps aux | head
%CPU, %MEM, VSZ, RSS, STAT, and COMMAND.ps aux --sort=-%cpu | head
ps aux --sort=-%mem | head
%MEM and RSS.ps -u "$USER"
ps -p 1 -f
systemd. Some containers may show a different PID 1.sleep 300 & ps -o pid,ppid,stat,etime,cmd -p $!
sleep 300 process with its PID, PPID, state, elapsed time, and command.kill $! ps -p $!
ps -p $! should normally show no process row for that PID.Read the table and choose the suspicious process. This trains your troubleshooting eyes.
| USER | PID | %CPU | %MEM | STAT | COMMAND |
|---|---|---|---|---|---|
| root | 1 | 0.0 | 0.2 | Ss | systemd |
| jp | 2401 | 1.2 | 2.1 | Sl | firefox |
| app | 3910 | 96.4 | 8.4 | R | python data_import.py |
| root | 1050 | 0.1 | 0.4 | S | sshd |
Small checks, big retention. Click an answer and get instant feedback.
Z usually mean?Hover or tap a card to reveal the answer.
Use this during labs or troubleshooting.
ps commandspsShow current terminal processes.ps -fShow full format for current terminal processes.ps -efShow all processes in full format.ps auxShow all processes with CPU and memory columns.ps -p PID -fShow details for one process ID.ps -u USERShow processes owned by a user.ps aux --sort=-%cpuSort by highest CPU first.ps aux --sort=-%memSort by highest memory first.IdentifyFind PID, user, command, CPU, memory.UnderstandCheck parent process and process state.ConfirmVerify whether it is expected or abnormal.ActRestart service or kill process only when safe.ps -ef, ps aux --sort=-%cpu | head, and relevant service logs.Clear answers to common confusions.
ps show itself?Because when you run ps, that command becomes a process too. It appears briefly while it is collecting and printing process information.
No. Sleeping usually means the process is waiting for something. Many healthy services spend most of their time sleeping.
System services often run as root or service users because they manage core operating system functions.
Not immediately. First identify what the process is, who owns it, what started it, and whether it is expected work. Killing blindly can break services or lose data.