DevOps and cloud

Stage 1 · Lesson 3 of 10

Processes and signals

Linux, the shell and scripting

A is a running program, and each one has a number called a process ID (PID). List processes with ps aux, watch them live with top or htop, and find what is using a port with ss -ltnp. You stop a process by sending it a signal, a short message from the system.

SIGTERM (kill PID) politely asks it to shut down cleanly. SIGKILL (kill -9) ends it at once, with no chance to tidy up. SIGHUP often tells a background service to reload its settings.

This matters well beyond the . systemd, and all stop apps by sending SIGTERM, waiting a grace period, then sending SIGKILL. An app that ignores SIGTERM drops the requests it is handling on every deploy.

Common trapreaching for kill -9 first, which can leave , half-written data and orphaned child processes behind.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

Keep handy

  • The handful of flags people actually use for each command, one line each

Also worth your time

Mark this stage as not done?