Linux Processes and Services

Linux Processes and Signals

Inspect process identity and relationships, distinguish foreground and background work, and escalate signals only when evidence justifies it.

Beginner14 min read
Linux Processes and Services lessonLinuxLearn

Inspect process identity and relationships, distinguish foreground and background work, and escalate signals only when evidence justifies it.

What you will be able to do

  • Explain the five core decisions involved in linux processes and signals.
  • Choose the narrow Linux command or method that matches a stated operational need.
  • Interpret command output as evidence before deciding whether to change system state.
  • Apply an observe, act, verify, and recover workflow to a realistic Linux task.

01

Build the Operating Model

Inspect process identity and relationships, distinguish foreground and background work, and escalate signals only when evidence justifies it.

Reliable Linux work separates observation, decision, action, and verification. That order keeps a command from becoming a guess and makes each result useful for the next decision.

Begin in a disposable lab or a recoverable environment. Record the active user, working directory, target, and baseline output before any command that can change system state.

02

Process identity

Each running process has a process identifier, while a parent identifier records which process created it. This distinction helps identify the smallest relevant part of the system before a change is attempted.

Inspect PID, PPID, user, and command together before selecting a process for any control action. Keep the command, target, and visible result together so another person can reproduce the reasoning.

The safety boundary is clear: a reused pid may later name another process. You should be able to verify this result: the intended process and parent are identified.

03

Process state

Process listings report states that help distinguish running, sleeping, stopped, and defunct tasks. This distinction helps identify the smallest relevant part of the system before a change is attempted.

Read the state beside command and resource data, then gather more evidence before treating it as a fault. Keep the command, target, and visible result together so another person can reproduce the reasoning.

The safety boundary is clear: sleeping does not by itself mean failure. You should be able to verify this result: current scheduling state is visible.

04

Foreground jobs

A foreground job is connected to the controlling terminal and normally receives terminal input directly. This distinction helps identify the smallest relevant part of the system before a change is attempted.

Use terminal job control to suspend or resume work rather than opening duplicate commands blindly. Keep the command, target, and visible result together so another person can reproduce the reasoning.

The safety boundary is clear: closing a terminal can affect attached jobs. You should be able to verify this result: one terminal controls the active job.

05

Graceful signals

SIGTERM requests process termination and allows a program to perform its normal signal handling. This distinction helps identify the smallest relevant part of the system before a change is attempted.

Send SIGTERM first, wait for the process to respond, and confirm whether it exited cleanly. Keep the command, target, and visible result together so another person can reproduce the reasoning.

The safety boundary is clear: unsaved work may still be at risk. You should be able to verify this result: the process receives a graceful stop request.

06

Forced termination

SIGKILL stops a process without allowing it to catch or ignore the signal. This distinction helps identify the smallest relevant part of the system before a change is attempted.

Reserve SIGKILL for a verified unresponsive target after a graceful signal and a reasonable wait. Keep the command, target, and visible result together so another person can reproduce the reasoning.

The safety boundary is clear: cleanup handlers do not run after sigkill. You should be able to verify this result: the kernel ends the selected process.

07

Apply One Controlled Change

Start from the read-only commands that reveal identity, scope, and current state. Write the expected result before entering a modifying command, including which files, processes, accounts, or connections may be affected.

Make one narrow change and stop. If the output reports an error or an unexpected target, preserve that evidence and return to inspection instead of adding unrelated commands.

Repeat the original observation after the action. A successful command status is useful, but the real completion signal is the intended state plus the absence of an unintended side effect.

08

Complete the Evidence Loop

A good terminal record answers four questions: what was observed, why one action was selected, exactly what changed, and how the result was verified. A screenshot without command context answers fewer questions than saved text output.

Test both the expected success and one safe failure condition. This confirms that the procedure recognizes a wrong path, missing permission, invalid input, stopped service, or unavailable endpoint instead of silently continuing.

Finish by restoring the lab baseline when the task was experimental. For an operational change, record the final state and the reversal step so later work begins from a known boundary.

09

Recap Before Practice and Prove

The first decision concerns process identity. Inspect PID, PPID, user, and command together before selecting a process for any control action.

The second decision concerns process state. Read the state beside command and resource data, then gather more evidence before treating it as a fault.

The third decision concerns foreground jobs. Use terminal job control to suspend or resume work rather than opening duplicate commands blindly.

The fourth decision concerns graceful signals. Send SIGTERM first, wait for the process to respond, and confirm whether it exited cleanly.

The final decision concerns forced termination. Reserve SIGKILL for a verified unresponsive target after a graceful signal and a reasonable wait. Keep the final output as the baseline for the next task.

NEXT STEP

Turn reading into recall

Practice the concepts without a timer, with coaching and retry available after every answer.

Open guided practice