Job has only existed within the terminal window that started it.
Job can consist of multiple processes linked together (e.g., a pipeline).
A Linux service (like sshd for remote access, nginx for web serving, or systemd itself) is a process, but it is never a job.
Because these processes don't have controlling terminal.
Run a long-time job at the back end
[Command] &
Example: sleep 2000 &
Run a long-time job at the terminal
sleep 1000
Press Ctrl+Z to pause the job
List all jobs
jobs
[Job Index] [+ means current task, - means holding task] [Job status] [Command]
[1]- Running sleep 2000 &
[2]+ Stopped sleep 1000
5. Move job to front
fg %[Job Index]
Example: fg %1
6. Press Ctrl+C to stop the job
7. List all jobs, now only 1 job is stopped
jobs
8. Move job to background
bg %[Job Index]
Example: bg %2
9. List all jobs, now only 1 job is running
jobs
Solution
student@localhost:~$ sleep 2000 &
[1] 4809
student@localhost:~$ sleep 1000
^Z[2]+ Stopped sleep 1000
student@localhost:~$ jobs
[1]- Running sleep 2000 &
[2]+ Stopped sleep 1000
student@localhost:~$ fg %1
sleep 2000
^C
student@localhost:~$ jobs
[2]+ Stopped sleep 1000
student@localhost:~$ bg %2
[2]+ sleep 1000 &
student@localhost:~$ jobs
[2]+ Running sleep 1000 &
student@localhost:~$