CmdKeys LogoCommand Quiz

Process Command Practice

Every Linux user needs to know how to find runaway processes, send them termination signals, and manage tasks suspended in the background. This track merges the ps, kill, and jobs commands into a single, comprehensive process management boot camp.

Command Reference

jobs

CommandDescription
jobsShow the status of all jobs tracked by the current shell session.
fg %<job_id>Bring a background or suspended job back to the foreground of your terminal.
bg %<job_id>Resume a suspended job, allowing it to run continuously in the background.
jobs -lShow the status of all jobs along with their actual system process IDs (PIDs).
jobs -pPrint only the process IDs of all background jobs (useful for scripting).

kill

CommandDescription
kill <pid>Politely terminate a program using the default SIGTERM signal (15).
kill -lList all available signal names and their corresponding numbers.
kill -9 <pid>Forcefully and immediately terminate a program without allowing it to clean up (SIGKILL).
kill -HUP <pid>Send a hang-up signal (SIGHUP), often used to ask a daemon to reload its configuration.
kill -INT <pid>Send an interrupt signal (SIGINT), identical to pressing Ctrl+C in the terminal.
kill -STOP <pid>Signal the operating system to pause a running program (SIGSTOP) until it receives a continue signal.
kill -CONT <pid>Resume a previously paused/stopped process (SIGCONT).

ps

CommandDescription
ps auxList all running processes on the system (BSD style syntax).
ps auxwwList all running processes including the full, un-truncated command string.
ps -u <username> -FList all processes owned by a specific user in extra full format.
ps k sizeSort the process list by memory consumption.
ps -L -p <pid>Display all threads belonging to a specific process.
ps -o ppid= -p <pid>Get only the parent process ID (PPID) of a specific process.
ps -u <username> fList all processes of a specific user formatted as an ASCII art tree.

Key Use Cases

  • Find all running processes on the system using ps aux
  • Forcefully terminate a frozen process using kill -9 (SIGKILL)
  • Gracefully ask a daemon to reload its configuration using kill -HUP
  • List all background jobs suspended in your current shell session using jobs -l
  • Bring a suspended background job back to the foreground using fg

Frequently Asked Questions

What is the difference between kill and kill -9?

By default, 'kill' sends SIGTERM (15), which politely asks the process to shut down and allows it to save state. 'kill -9' sends SIGKILL, which tells the Linux kernel to immediately destroy the process without giving it a chance to clean up.

What does the 'aux' in ps aux mean?

It's historically from BSD systems: 'a' shows processes for all users, 'u' displays the user/owner and memory/cpu usage, and 'x' shows processes not attached to a terminal (like background daemons).

How do jobs relate to processes?

A process is managed by the Linux kernel system-wide. A 'job' is a concept managed locally by your shell (like bash or zsh). When you append '&' to a command or press Ctrl+Z, the shell tracks it as a job, which you can manage with 'fg', 'bg', and 'jobs'.

Ready to master Process commands?

Test your muscle memory with our spaced-repetition quiz system. Free forever.

Start Practice Now →