Managing Processes
- There are Processes (managed by the kernel) and there are Jobs
- Jobs cant contain multiple processes
- Jobs also can be suspended and resumed at a later stage
Backgrounding Processes (bg)
- To send a command straight to the background ad a
&at the end of the command ping -c 400 localhost > ping_results.txt &- If you forgot you can also press
Ctrl + Zto suspend it and then runbgto run it in the background
Jobs Control: jobs and fg
jobs: Get list of jobsfg %<job-id>Bring the job to the foreground
Process Control: ps and kill
pslists jobs system wide, not just for the current shell as we get withjobs-eget all processes-ffull format output-Conly the the processes for a given command namekill <PID of the process>to terminate the process
Relevant Note(s): Linux Basics