Processes
Inspect running work, stop it safely and understand foreground versus background.
What you will be able to do
- Use ps aux or top to inspect processes.
- Use Ctrl+C for SIGINT and Ctrl+Z to suspend.
- Use kill -TERM before kill -9.
- Use jobs and fg/bg for shell jobs.
In plain English
Every running program is a process with a pid. Run long jobs in the background with &, keep them alive with nohup or a process manager, and stop them with kill using the right signal. SIGTERM asks politely; SIGKILL does not.
sleep 60 &
jobs
ps -p $! -o pid,cmd
kill -TERM $!Your turn
EasyRun in the background
Start sleep 30 in the background and print its pid.
BASH · starter
sleep 30Check your understanding before moving on.
Knowledge checkQuestion 1
Which signal asks a process to shut down gracefully?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.