Home/Engineer/OS / Systems/Complete Process Management …
OS / SystemsBeginnerUbuntuDebianCentOSpskillnice

Complete Process Management Guide — ps · kill · nice · htop

A practical rundown of Linux process management: inspecting processes with ps, sending signals with kill, adjusting priority with nice/renice, and using htop in real-world workflows.

Contents
  1. ps — Inspecting Processes
  2. kill — Sending Signals
  3. nice · renice — Adjusting Priority
  4. htop — Interactive Monitoring
  5. Managing Background Processes

ps — Inspecting Processes

Bash
# Current session processes
ps

# All processes (BSD style)
ps aux

# All processes (Unix style)
ps -ef

# Search for a specific process
ps aux | grep nginx

# View as a tree
ps axjf
pstree -p

# Processes for a specific user
ps -u deploy

# Sort by CPU / memory
ps aux --sort=-%cpu | head -10
ps aux --sort=-%mem | head -10

Key columns

ColumnMeaning
PIDProcess ID
%CPUCPU usage
%MEMMemory usage
VSZVirtual memory size (KB)
RSSResident set size (KB)
STATState (S=sleeping, R=running, Z=zombie, D=I/O wait)

kill — Sending Signals

Bash
# Default terminate (SIGTERM, 15 — graceful shutdown request)
kill 1234

# Force kill (SIGKILL, 9 — immediate termination)
kill -9 1234
kill -KILL 1234

# Kill by process name
pkill nginx
pkill -9 node

# Signal all matching processes
killall nginx

# List signals
kill -l

Commonly used signals

SignalNumberMeaning
SIGTERM15Graceful shutdown request
SIGKILL9Force kill (cannot be ignored)
SIGHUP1Restart (reload configuration)
SIGSTOP19Pause
SIGCONT18Resume

nice · renice — Adjusting Priority

nice value: -20 (highest priority) ~ +19 (lowest priority), default 0

Bash
# Run at lower priority (background work)
nice -n 10 tar czf backup.tar.gz /data

# Higher priority (requires root)
sudo nice -n -10 ./critical-process

# Change priority of a running process
renice -n 5 -p 1234        # By PID
renice -n 10 -u deploy     # By user

# Check current priority
ps -o pid,ni,comm -p 1234

htop — Interactive Monitoring

Bash
sudo apt install -y htop
htop

Key shortcuts

KeyAction
F2Setup
F3 / /Search
F4Filter
F5Tree view
F6Select sort column
F9Send signal (kill)
F10 / qQuit
SpaceTag process
uFilter by user

Managing Background Processes

Bash
# Run in background
./long-task.sh &

# Job list
jobs

# Bring to foreground
fg %1

# Send to background (after Ctrl+Z)
bg %1

# Keep running after terminal closes
nohup ./script.sh > output.log 2>&1 &

# Detach a running process
disown %1
#ps#kill#nice#htop#linux
Editorial note

AI tools may assist drafting. Check the evidence in each guide for whether commands were run and which environment was used. Confirm the current docs for your version before applying instructions, and email us about errors. email us

Topic-related official docs (auto-linked · not per-claim sources)Linux man pages ↗

Questions & answers

Ask a question about this guide. We'll review and reply.