Phase 0: Command Line & OS Literacy · ~35 minutes · Terminal · job control · signals
Job Control, Signals, and Making the Terminal Yours
Ctrl-C doesn't force-quit anything. It sends a polite request (SIGINT) that a program can choose to ignore — which is exactly why it sometimes doesn't work.
Hiring signal: Knows Ctrl-C is a request a program can ignore, not a guarantee, and reaches for SIGKILL correctly when it's genuinely needed
What you will learn
- Use & / fg / bg to move a process between foreground and background
- Explain Ctrl-C as sending SIGINT — a request a program can catch and ignore, not a forced stop
- Diagnose a stuck process ignoring Ctrl-C and correctly reach for SIGKILL
- Describe what dotfiles are and why personal terminal configuration lives there
Introduction
Type: Learn Languages: Bash / Zsh Prerequisites: Lesson 03 (Permissions, Processes, and Environment Variables) Time: ~35 minutes
Objective
Learning objectives
- Use
&/fg/bg to move a process between foreground and background - Explain Ctrl-C as sending
SIGINT — a request a program can catch and ignore, not a forced stop - Diagnose a stuck process ignoring Ctrl-C and correctly reach for
SIGKILL - Describe what dotfiles are and why personal terminal configuration lives there
What you're building
A script long_task.sh that prints a message every second for 60 seconds (a simple loop with sleep 1):
- Start it, background it with
&, confirm it's running with jobs - Bring it to the foreground with
fg, then interrupt it with Ctrl-C, and confirm in writing what signal that sends - Write a second script that traps and ignores
SIGINT (following this lesson's stubborn_script.sh pattern), start it, attempt to interrupt it with SIGINT (confirm it survives), then correctly stop it with SIGKILL - Record what you observed at each step in
job_control_notes.txt, including the exit status after each termination method
A long-running data import script won't stop after several Ctrl-C presses. What's the most accurate explanation and correct next step, based on this lesson?
This is precisely this lesson's reproduced example. Repeated Ctrl-C presses just mean SIGINT was sent repeatedly and not honored each time — a script can genuinely be written (or stuck in a state) that doesn't respond to it. SIGKILL is the deliberate, correct escalation specifically because it's the one signal the operating system enforces unconditionally, delivered outside the program's own ability to catch or ignore it — not a more forceful version of asking nicely, a fundamentally different mechanism.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers The Problem, Check Yourself, Key Terms & Next — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.
Browse all courses · View pricing · DeVenture Academy