Question: Linux question Control jobs for multi-tasking a) Create some jobs i) Type cat command in the terminal, and press ctrl-c to terminate it. Type jobs

Linux question

Control jobs for multi-tasking

a) Create some jobs

i) Type cat command in the terminal, and press ctrl-c to terminate it. Type jobs command and you will see nothing.

ii) Type cat command in the terminal, and press ctrl-z to stop it (suspend it). Use jobs command and explain what you see.

iii) Execute some command in the background using the & for example: nano &

iv) Execute another command (for example man nano ) and press ctrl-z to stop it.

b) Use the jobs command to see all jobs. Provide a screenshot.

c) Switch between jobs. Provide a screenshot. Use the fg command to bring a stopped job to foreground. Or we can specifically use fg job-number to bring any jobs to foreground. For example fg 3 and see the job number from the jobs command output.

d) Use ctrl-z to stop a job and send it to background. Provide screenshots. Practice switching between the nano job and the man nano job.

a) Kill the cat job (terminate it)

b) kill %1

c) Verify using the jobs command.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!