Juggle the Jobs
Practise job control in your terminal: run, pause, move and stop jobs with &, Ctrl+Z, bg, fg, Ctrl+C and kill. Do the tasks in order.
How it works: the terminal below is a real Linux machine running in your browser. Click it and
type. Tasks tick themselves off as you complete them; questions are answered in the box under each task.
Press Reset any time for a fresh machine. Your password on this machine (for
sudo) is student.
Hints
^Z and ^C in the solution mean pressing Ctrl+Z and Ctrl+C.
Lost track? jobs lists your jobs and their numbers.
Solution explanation
& starts job 1 in the background. Ctrl+Z pauses sleep 2000 (job 2) and bg lets it continue in the background. fg %1 brings job 1 to the foreground, where Ctrl+C interrupts it, and kill %2 sends job 2 the TERM signal.
Show solution
sleep 1000 &
sleep 2000
^Z
bg
jobs
fg %1
^C
kill %2
jobs