$
Learn Linux handbook
en
XP:0

Chapter 07 of 17

Understand processes and signals

Find the right process, inspect it, and choose a proportionate intervention.

The mental model.

A process is a running program with a PID, owner, environment, open files, and parent. ps gives a snapshot; top shows changing resource use. A process name alone is not a reliable identity: inspect command arguments and ownership.

SIGTERM requests orderly shutdown and allows cleanup. SIGKILL cannot be handled and prevents that cleanup. Start with TERM and allow time; use KILL only when necessary. Recheck the PID before acting because identifiers can be reused.

Shell jobs are distinct from system services. Ctrl-Z suspends a foreground job, bg resumes it in the background, and fg brings it back. A background process may still depend on its terminal. tmux helps preserve interactive sessions across disconnections.

Nice values influence scheduling priority; they do not impose CPU limits. Diagnose high CPU, I/O waits, memory pressure, and dependency failures separately instead of killing the largest number in top.

Read it. Predict it. Try it.

Before running these commands, predict what each line will change or print. Launch a quest below to open the simulated terminal.

ps aux
pgrep nginx
ps -ef
jobs

Inspect processes and shell jobs. Use the process-management quests for safe simulated signal practice.

Check your understanding

Explain the why.

Which signal should normally be tried before SIGKILL?

Put it into practice.

Complete the exercises, then try the Boss Challenge without hints. Each quest checks its own objectives. You can revisit this chapter at any time.

Prefer to read first?

Make the learning stick.

Close the explanation and describe the main idea in your own words. Change a filename or input and predict the outcome. Tomorrow, repeat a quest without hints. Then apply it in a disposable real Linux environment.

Open the real-system labs →