Processes and jobs
Every running program is a process. It has a PID, and you can watch it, change its priority, and send it signals. In this lesson you start a couple of background processes, find them, and terminate them cleanly.
Steps
1. A background process
Start a long command in the background with a trailing &. Control returns to the shell at once while the process keeps running. Do not forget the &: without it the command holds the terminal until it finishes and you cannot type. If that happens, press Ctrl+C to interrupt it and run it again with the &.
sleep 1500 &
jobs # your background jobs
pgrep -x sleep2. Find and save the PID
Every process has a PID. Find your
Locked
The rest of this lesson is part of a paid course
You are reading the open part. Buy the course to unlock the whole lesson and its lab.