Changes

Jump to: navigation, search

Tutorial8: Links / Process Management

1 byte added, 14:59, 25 February 2021
INVESTIGATION 2: MANAGING PROCESSES
# 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>
# Press the '''key combination''' to '''terminate''' the process running in the '''foreground''': <span style="color:blue;font-family:courier;font-weight:bold">ctrl-c</span> <br><br>You can issue Linux commands with ampersand "'''&'''" in your terminal to '''run''' processes automatically in the<br>'''background''' <u>without</u> having to issue ''ctrl-z'' and ''bg'' short-cut keys.<br><br>
# Issue the following Linux commandcommands: <span style="color:blue;font-family:courier;font-weight:bold">sleep 500 & sleep 600 & sleep 700 &</span><br><br>
# Issue the '''jobs''' command. What do you notice?<br><br>In the jobs command output, jobs that display a plus sign ('''+''') indicates the '''most recent''' process<br>placed in to the background, and a minus sign ('''-''') indicates the '''second most recent''' process<br>placed into the background.<br><br>The '''kill''' command issued to terminate processes that are running in the '''foreground''' or '''background'''.<br>Issuing the kill command <u>without</u> options would send the '''SIGTERM''' signal (eg. ''signal terminate'' - which is signal '''#15''').<br><br>
# Issue the following Linux command to '''terminate''' the '''first''' job running in the background:<br><span style="color:blue;font-family:courier;font-weight:bold">kill %1</span><br><br>'''NOTE:''' You can specify job number preceded by percent % with the<br>'''kill''', '''bg''', and '''fg''' commands to specify the processes' job number.<br><br>
13,420
edits

Navigation menu