Question

On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and...

  1. On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!.

  2. At the command prompt, type sleep 6000 and press Enter to start the sleep com- mand, which waits 6000 seconds in the foreground. Do you get your prompt back after you enter this command? Why? Send the process an INT signal by typing theCtrl+c key combination.

  3. At the command prompt, type sleep 6000& and press Enter to start the sleep com- mand, which waits 6000 seconds in the background. Observe the background Job ID and PID that is returned.

  4. Bring the background sleep process to the foreground by typing fg %1 at the command prompt, then press Enter. Send the process an INT signal by typing the Ctrl+c key combination.

  5. Place another sleep command in memory by typing the sleep 6000& command and pressing Enter. Repeat this command three more times to place a total of four sleepcommands in memory.

  6. At the command prompt, type jobs and press Enter to view the jobs running in the background. What does the + symbol indicate?

  7. At the command prompt, type kill % and press Enter to terminate the most recent pro- cess and view the output.

  8. At the command prompt, type kill %1 and press Enter to terminate background job #1 and view the output.

  9. At the command prompt, type killall sleep and press Enter to terminate the remaining sleep processes in memory. Verify that there are no more sleep processes in memory by typing the jobs command, then press Enter.

  10. Place a sleep command in memory by typing sleep 6000& at a command prompt and pressing Enter.

  11. Place a sleep command in memory with a lower priority by typing nice –n 19 sleep 6000& at a command prompt and pressing Enter.

  12. Verify that these two processes have different nice values by typing the commandps –el | grep sleep at the command prompt and pressing Enter. Record the PID of the process with a nice value of 0: _.

  13. At the command prompt, type renice +10 PID (where PID is the PID you recorded in the previous question) to change the priority of the process. Type the command ps –el | grep sleep and press Enter to verify the new priority.

  14. Type exit and press Enter to log out of your shell.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Following commands are performed on the Ubuntu distribution of Linux which is similar to Fedora Linux. If you're using a Virtual Machine you'll have to log in to the terminal using the credentials and log out using the exit command:

Following are the answers:

  • Prompt is not returned immediately.
  • sleep 6000 command suspends the process for 6000 seconds. We get the prompt back after 6000 seconds
  • '+' symbol indicates the job that would be used as a default for the fg command
  • The PID of the process with a nice value of 0 is 7103
Add a comment
Know the answer?
Add Answer to:
On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and...

    On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. At the command prompt, type ps –ef | grep bash and press Enter to view the bash shells that are running in memory on your computer. Record the PID of the bash shell running in your terminal (tty2): . At the command prompt, type kill –l and press...

  • On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and...

    On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. At the command prompt, type cat /etc/shadow and press Enter. Record the encrypted password for bozo’s user account. At the command prompt, type passwd –l bozo and press Enter to lock bozo’s user account. At the command prompt, type cat /etc/shadow and press Enter. What has been changed...

  • Process Management in Linux 4) Control jobs for multi-tasking a) Create some jobs a) Create some...

    Process Management in Linux 4) Control jobs for multi-tasking a) Create some jobs 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 what do you see? iii) Execute some command in the background using the &, for example: nano & iv) Execute another command (for...

  • What are the exact commands I should use to complete the task? 1. Run command (date;...

    What are the exact commands I should use to complete the task? 1. Run command (date; sleep 45; echo “Done.”; date) > date.out in the foreground (i.e. without &) 2. Suspend it with Ctrl-Z. Pay attention to the number in the [], it will become handy later. This number is the job number of the command that has been suspended. 3. Run command top to display only processes started by you (i.e. associated with your userid). Write down the process...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT