Open main menu

CDOT Wiki β

Changes

Tutorial8: Links / Process Management

39 bytes removed, 11:02, 7 March 2021
INVESTIGATION 2: MANAGING PROCESSES
# You should now see output similar to what is displayed below:<br><span style="font-family:courier;font-weight:bold">[1]+ Stopped sleep 700</span><br><br>'''NOTE:''' This indicates that this process has been placed into the '''background'''.<br>This is useful in order to "'''free-up'''" the terminal to run other Linux commands.<br><br>
# Issue the following Linux command: <span style="color:blue;font-family:courier;font-weight:bold">jobs</span><br><br>You should see the following output similar that was displayed above:<br><span style="font-family:courier;font-weight:bold">[1]+ Stopped sleep 700</span><br><br>This display indicates that this process (that is now in the background) has '''stopped'''.<br>In other words, the ''sleep'' command is NOT counting-down to zero to terminate.<br><br>'''NOTE:''' You need to use the '''bg''' command to '''run''' that process that was sent into the '''background'''.<br><br>[[Image:process-jobs2.png|thumb|right|300px|Using the '''bg''' command to '''run recent process''' that was placed into background from using '''ctrl-z''' keys.]]
# Issue the following Linux command: <span style="color:blue;font-family:courier;font-weight:bold">bg</span><br><br>'''NOTE:''' You can use the bg command WITHOUT arguments to specify the most run recent process that was placed into in the background. From the '''jobs''' command, the process that has a plus sign "+" indicates the most recent process placed into the background.<br><br>
# Issue the following Linux command: <span style="color:blue;font-family:courier;font-weight:bold">jobs</span><br><br>You should see the following output similar that was displayed above:<br><span style="font-family:courier;font-weight:bold">[1]+ sleep 700 &</span><br><br>This display indicates that this process in the background is '''running in the background'''<br>(indicated by the ampersand character "'''&'''"). Now this command has resume pausing until '''700 seconds'''.<br><br>[[Image:process-jobs3.png|thumb|right|300px|Using the '''ampersand''' character '''&''' to run a '''series of processes''' in the background.]]
# Issue the following Linux command: <span style="color:blue;font-family:courier;font-weight:bold">fg</span><br><br>You should notice that the ''sleep'' command is now running in the '''foreground'''.<br><br>
13,420
edits