Signals and kill, background jobs, nice
Sign in to read this lesson
Stopping a frozen process, running a long command in the background, keeping work going when SSH drops, stopping a heavy backup from slowing the site — all of this is done with signals and priorities.
What you will learn
kill PIDsends SIGTERM (15) — "finish cleanly"; if it does not respond, SIGKILL (kill -9).SIGHUP(1) makes many services re-read their configuration;Ctrl+C= SIGINT,Ctrl+Z= SIGTSTP.pkill nameandkillall namestop processes by name — be careful.command &starts in the background; manage withjobs,fg,bg;nohuportmuxkeep the work alive when SSH drops.nice -n 10 commandstarts with low priority,renicechanges the priority of a running process.
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.