SIGHUP Signal Explained (Signal 1)
What the Linux SIGHUP signal does and when it's used.
Published October 23, 2026
SIGHUP (signal 1, hangup) was originally sent when a terminal connection dropped. Today daemons commonly use it to reload their configuration without restarting.
What it does
Default action: Terminate (for ordinary programs). It can be caught with a signal handler.
Typically sent by: closing a terminal, kill -HUP PID, nginx -s reload. List all signals with kill -l.
Signal number and delivery
kill -l | grep SIGHUP
1) SIGHUP
kill -1 1234 # or kill -HUP 1234
(signal delivered to process 1234)
Practical examples
Send it from the shell
kill -1 <PID>
kill -SIGHUP <PID>
pkill -1 nginxHandle it in a script
trap 'echo got SIGHUP; cleanup; exit' SIGHUP
while true; do sleep 1; doneHandle it in code
import signal, sys
def handler(sig, frame):
print('received', sig)
sys.exit(0)
signal.signal(signal.SIGHUP, handler)Common mistakes
- Using kill -9 before trying SIGTERM.
- Forgetting to find the right PID (ps aux | grep, pgrep).
- Not handling signals in long-running services.
Key takeaways
- SIGHUP is signal 1.
- Default: Terminate (for ordinary programs).
- Use kill -l to list all signals.
FAQ
What does nohup do?
It makes a command ignore SIGHUP so it keeps running after you log out.
How do I list all signals?
Run kill -l.