Quiz Entry - updated: 2026.07.14
What keyboard shortcuts control the foreground process?
Ctrl+C interrupts (SIGINT), Ctrl+Z suspends (SIGTSTP), Ctrl+\ quits with a core dump (SIGQUIT), and Ctrl+D sends end-of-input (EOF, not a signal).
These keys are the terminal's shortcut for sending signals to the foreground job — the terminal driver translates the keystroke into the corresponding signal. The one to keep straight is Ctrl+D: it's not a signal at all, just an end-of-file marker on the input stream.
| Shortcut | Sends | Effect |
|---|---|---|
| Ctrl+C | SIGINT (2) | Interrupt — usually terminates |
| Ctrl+Z | SIGTSTP (20) | Suspend (pause), job goes to background-stopped |
| Ctrl+\ | SIGQUIT (3) | Quit and dump core for debugging |
| Ctrl+D | — (EOF) | Signals end-of-input; closes a shell when the line is empty |
After Ctrl+Z:
$ jobs # See suspended jobs
[1]+ Stopped vim file.txt
$ bg %1 # Continue in background
$ fg %1 # Bring back to foreground
$ kill %1 # Kill the job
Common mistake:
Ctrl+Zdoesn't kill - process is still running (paused)- Use
Ctrl+Cto actually terminate - Or
bgto continue in background
Tip: Accidentally started a long command? Use Ctrl+Z then bg to push it to background!