Question

WITH SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-3 In this hands-on project, you run...

WITH SCREENSHOTS PLEASE

Linux+ Guide to Linux Certification Project 9-3
In this hands-on project, you run processes in the background, kill them using the kill and killall commands, and change their priorities using the nice and renice commands.
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 the Ctrl+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 sleep commands 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 command ps –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

Below is the complete commands list for the given statements

#######################################################

root@test-dl:~$ sleep 6000
^C
root@test-dl:~$ sleep 6000 &
[1] 25892
root@test-dl:~$ fg %1
sleep 6000
^C
root@test-dl:~$ sleep 6000 &
[1] 25893
root@test-dl:~$ sleep 6000 &
[2] 25894
root@test-dl:~$ sleep 6000 &
[3] 25895
root@test-dl:~$ sleep 6000 &
[4] 25896
root@test-dl:~$ jobs
[1] Running sleep 6000 &
[2] Running sleep 6000 &
[3]- Running sleep 6000 &
[4]+ Running sleep 6000 &
root@test-dl:~$ kill %
root@test-dl:~$ kill %1
[4]+ Terminated sleep 6000
root@test-dl:~$ killall sleep
[1] Terminated sleep 6000
[2]- Terminated sleep 6000
[3]+ Terminated sleep 6000
root@test-dl:~$ jobs
root@test-dl:~$ sleep 6000 &
[1] 25900
root@test-dl:~$ nice -n 19 sleep 6000 &
[2] 25902
root@test-dl:~$ ps -el | grep sleep
0 S 1000 25900 25834 0 80 0 - 3364 hrtime pts/10 00:00:00 sleep
0 S 1000 25902 25834 0 99 19 - 3364 hrtime pts/10 00:00:00 sleep
root@test-dl:~$ renice +10 25900
25900 (process ID) old priority 0, new priority 10
root@test-dl:~$ ps -el | grep sleep
0 S 1000 25900 25834 0 90 10 - 3364 hrtime pts/10 00:00:00 sleep
0 S 1000 25902 25834 0 99 19 - 3364 hrtime pts/10 00:00:00 sleep
root@test-dl:~$exit

#####################################################################

Answers

------------------

2) Didn't get prompt after entering the command since the command executed in foreground.

6) + indicates the job that was sent to the background last.

Add a comment
Know the answer?
Add Answer to:
WITH SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-3 In this hands-on project, you run...
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 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. At the...

  • with SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-4 In this hands-on project, you view...

    with SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-4 In this hands-on project, you view and manage processes using the top command-line utility. 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 top and press Enter. 3. From the output on the terminal screen, record the following information: a....

  • 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...

  • Project 3-7 In this hands-on project, you use the grep and egrep commands alongside regular ex...

    Project 3-7 In this hands-on project, you use the grep and egrep commands alongside regular ex pression metacharacters to ex plore the contents of tex t files. 1. 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 grep “Inn” sample1 and press Enter. What is displayed and why? 3. At the command prompt, type grep -v “Inn”...

  • 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...

  • You are currently running/debugging a shell script program in the foreground that seems to be in an infinite loop, to terminate/kill the shell script program. 7. (type/enter - control C to send a &#3...

    You are currently running/debugging a shell script program in the foreground that seems to be in an infinite loop, to terminate/kill the shell script program. 7. (type/enter - control C to send a "program interrupt" ) or (contact the sysadmin person to kill your shell script program) 8. The UNIX/Linux exit command entered on the KORN shell command line will exit the shell session properly (best practice). [True / False] When killing a background process with the kill command you...

  • 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...

  • In this hands-on project, you compile and install a program from source code. On your Fedora...

    In this hands-on project, you compile and install a program from source code. On your Fedora Linux virtual machine, switch to a graphical terminal (tty1) by pressingCtrl+Alt+F1 and log in to the GNOME desktop using the user name of user1 and the password of LNXrocks!. Open the Firefox Web browser and download the source code tarball for rdesktop 1.8.2 (rdesktop-1.8.2.tar.gz) from www.rdesktop.org. Save the source code tarball to the default location (/home/user1/Downloads) and log out of the GNOME desktop when...

  • Project 4-4 In this hands-on project, you make and view links to files and directories. Switch to...

    Project 4-4 In this hands-on project, you make and view links to files and directories.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 secret.At the command prompt, type cd samples and press Enter. Next, type ls -F at the command prompt and press Enter. What files do you see? Next, type ls -l at the command prompt and press Enter. What is the link...

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