Docsity

Linux Pro Exam - Labs: Practical Exercises and Solutions, Exams of Computer Science

Toggle sidebar
bg1
TestOut Linux Pro Exam – Labs -
latest update with well answered
questions
6.1.5
There is a C debugger package installed on the server that your
organization is no longer using. The IT manager in your organization has
asked you to uninstall the ddd-C-Debug-2.8.15-3.cd15 package. Complete
this lab from the Terminal.
In this lab, your task is to:
- Uninstall the ddd-C-Debug-2.8.15-3.cd15 package.
- Verify that the ddd-C-Debug-2.8.15-3.cd15 package is uninstalled. - **
VERIFIED ANSWERS🔰 ✔✔rpm -e ddd-C-Debug-2.8.15-3.cd15
rpm -q ddd-C-Debug-2.8.15-3.cd15
2.9.6
You are experiencing a few issues on your Linux system that you think are
related to either your terminal's environment settings or the shell being
used. You need to view the files that will tell you information about your
terminal. Complete this lab from the Terminal.
In this lab, your task is to:
- View the contents of the file /root/.bash_profile.
- Answer Question 1.
- View the contents of the file /etc/shells.
- Answer Question 2. - ** VERIFIED ANSWERS🔰 ✔✔cat /root/.bash_profile
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f

Partial preview of the text

Download Linux Pro Exam - Labs: Practical Exercises and Solutions and more Exams Computer Science in PDF only on Docsity!

TestOut Linux Pro Exam – Labs -

latest update with well answered

questions

There is a C debugger package installed on the server that your organization is no longer using. The IT manager in your organization has asked you to uninstall the ddd-C-Debug-2.8.15-3.cd15 package. Complete this lab from the Terminal. In this lab, your task is to:

  • Uninstall the ddd-C-Debug-2.8.15-3.cd15 package.
  • Verify that the ddd-C-Debug-2.8.15-3.cd15 package is uninstalled. - ** VERIFIED ANSWERS 🔰 ✔✔ rpm -e ddd-C-Debug-2.8.15-3.cd rpm -q ddd-C-Debug-2.8.15-3.cd 2.9. You are experiencing a few issues on your Linux system that you think are related to either your terminal's environment settings or the shell being used. You need to view the files that will tell you information about your terminal. Complete this lab from the Terminal. In this lab, your task is to:
  • View the contents of the file /root/.bash_profile.
  • Answer Question 1.
  • View the contents of the file /etc/shells.
  • Answer Question 2. - ** VERIFIED ANSWERS 🔰 ✔✔ cat /root/.bash_profile

cat /etc/shells 8.9. The CEO of the company wants to make sure that the employees' personal information, as stored in the /hr/personnel file, is protected. The CEO has asked that you make sure that the human resources (HR) department is the owner of that file. Complete this lab from the Terminal. In this lab, your task is to:

  • Find the current owner of the /hr/personnel file.
  • Answer the question.
  • Change the group ownership of the /hr/personnel file to the hr group.
  • Verify the ownership change. - ** VERIFIED ANSWERS 🔰 ✔✔ ls -l /hr chgrp hr /hr/personnel ls -l /hr 8.6. You recently installed and formatted a new hard drive in your system. Its device file name is /dev/sdb1. Now you want to mount the volume. Complete this lab from the Terminal. In this lab, your task is to:
  • Create the /mnt/disk directory.
  • Mount /dev/sdb1 to the /mnt/disk directory with the ext3 file system.
  • Use the mount command to verify that the volume is mounted correctly. - ** VERIFIED ANSWERS 🔰 ✔✔ mkdir /mnt/disk mount -t ext3 /dev/sdb1 /mnt/disk

nano /etc/sysconfig/network-scripts/ifcfg-enp2s GATEWAY: 192.168.0. ip link set enp2s0 down ip link set enp2s0 up ping -c4 163.128.80. ITAdmin Terminal ----- ping -c4 192.168.0. ping -c4 192.168.0. ip addr nano /etc/sysconfig/network-scripts/ifcfg-enp2s NETMASK: 255.255.255. ip link set enp2s0 down ip link set enp2s0 up ping -c4 192.168.0. 8.5. You've installed a new hard drive and created a partition on the drive. You now need to format the partition before you can save data on the new hard drive. Complete this lab from the Terminal. In this lab, your task is to:

  • Format the /dev/sdb1 partition with the ext3 file system. - ** VERIFIED ANSWERS 🔰 ✔✔ mkfs -t ext3 /dev/sdb 10.1. You are troubleshooting your Linux system and need to know some information about some of the currently running processes. Complete this lab from the Terminal. In this lab, your task is to:
  • Use the ps command, with the applicable options, to find information about the currently running processes.
  • Answer the questions. - ** VERIFIED ANSWERS 🔰 ✔✔ ps aux | less 10.2. As a part of your daily maintenance, you scan for and kill any zombie processes on the system. Complete this lab from the Terminal. In this lab, your task is to:
  • Use the ps command to find zombie processes.
  • Use the kill command to terminate all zombie processes. - ** VERIFIED ANSWERS 🔰 ✔✔ ps aux | less q kill -9 1301 kill -9 1570 kill -9 1980 12.2. You share a number of files from your computer, and you have received a number of calls from users who say they cannot connect to the files. You check your computer and find that the Ethernet cable is unplugged. You have plugged the Ethernet cable in, so you need to start the network interface card. Complete this lab from the Terminal. In this lab, your task is to:
  • Determine which network interface went down when it was unplugged.
  • Start the network interface from the command line. - ** VERIFIED ANSWERS 🔰 ✔✔ ip addr ip link set enp2s1 up
  • View the disk information for your system.
  • Answer the questions. - ** VERIFIED ANSWERS 🔰 ✔✔ fdisk -l 9.2. Your manager has asked you to remove the gameport module from the Linux print server. Complete this lab from the Terminal. In this lab, your task is to:
  • Verify that the gameport module has been inserted into the kernel.
  • Remove the gameport driver module from the kernel. - ** VERIFIED ANSWERS 🔰 ✔✔ lsmod rmmod gameport lsmod 11.2. You have been tasked with checking the status of a recently repaired system that had chronic high utilization. You must determine whether the machine is under a heavy load. Complete this lab from the Terminal. In this lab, your task is to:
  • Run the applicable command to view which processes are consuming the most CPU time.
  • Answer the questions. - ** VERIFIED ANSWERS 🔰 ✔✔ top kthreadd 0 8.12. You have a Linux workstation, which you use at home for browsing the internet, playing music, and writing letters. When you run your MP3 player, it sometimes pauses in playback. You have heard that you might be able to

alleviate the problem by raising the priority of the program. You decide to set the SUID bit to automatically run the program as root and, thereby, raise its priority. Complete this lab from the Terminal. In this lab, your task is to:

  • Set the SUID bit for the /usr/bin/xmm - ** VERIFIED ANSWERS 🔰 ✔✔ chmod 4755 /usr/bin/xmms 2.8. Your company recently changed directions and decided to terminate three products. All the necessary files have been backed up, archived, and deleted. Now you need to clean up your system by removing the directories that were used to hold the product files. In this lab, your task is to complete the following:
  • From the command line, delete the following directories from the /projects directory:
  • heartbt
  • heartmon
  • heartstrng
  • Use the ls command to verify the deletion of the directories - ** VERIFIED ANSWERS 🔰 ✔✔ cd /projects rmdir heartbt heartmon heartstrng ls -l /projects 8.12. You have a Linux workstation that you use at home. You are the only person that uses this computer. You want to improve security by removing the SUID and SGID from some files. Complete this lab from the Terminal. In this lab, your task is to:
  • Remove the SUID from the following files: /usr/bin/gpasswd/ usr/bin/newgrp
  • Remove the SGID from the following files:

umask 007 umask 4.3. You're working on your Linux server and need to change to single user mode. You can change to single user mode with the systemctl command and rescue.target, which is a special target unit that runs a base system in single user mode and a rescue shell. In this lab, your task is to:

  • Use the systemctl command to make rescue.target the current target.
  • After changing to rescue.target, log back in as root using 1worm4b8 as the password. - ** VERIFIED ANSWERS 🔰 ✔✔ systemctl isolate rescue.target 1worm4b 2.10. Your company uses a proprietary graphics program called Imitator. This program is stored in the /root directory. Maggie Brown (mbrown) needs to create and modify images using the Imitator program. In this lab, your task is to create a symbolic link file to /root/imitator as follows:
  • Use imitator_link as the symbolic link name.
  • Create the link file in /home/mbrown. - ** VERIFIED ANSWERS 🔰 ✔✔ ln - s /root/imitator /home/mbrown/imitator_link 7.2. Every seven years, your company provides a six-week sabbatical for each employee. Vera Edwards (vedwards), Corey Flynn (cflynn), and Bhumika Kahn (bkahn) are leaving today, while Maggie Brown (mbrown), Brenda Cassini (bcassini), and Arturo Espinoza (aespinoza) are just returning. Complete this lab from the Terminal.

The company Security Policy mandates that user accounts for employees gone for longer than two weeks be disabled. In this lab, your task is to:

  • Lock the following user accou - ** VERIFIED ANSWERS 🔰 ✔✔ usermod -L vedwards usermod -L cflynn usermod -L bkahn usermod -U mbrown usermod -U bcassini usermod -U aespinoza cat /etc/shadow 12.2. In this lab, you will discover important facts about network communications by using the ping and traceroute commands. IT-Laptop has a configured IP address, but no default gateway address. Use the Exhibits link at the top right to view the location and IP information of the routers in your network. The following local network IP addresses are used in this lab: - ** VERIFIED ANSWERS 🔰 ✔✔ IT Laptop ---------- ping -c4 192.168.0. ping -c4 199.92.0. ping -c4 192.168.0. ping -c4 163.128.78. cd /etc/sysconfig/network-scripts ls cat ifcfg-enp2s
  • Verify that the fontconfig package has been installed. - ** VERIFIED ANSWERS 🔰 ✔✔ su - 1worm4b rpm -ivh /home/wadams/Downloads/fontconfig-3.10.87-5.fc24.rpm rpm -q fontconfig 7.3. The VP of sales has promoted Salman Chawla (schawla) to regional sales director. Now, Salman needs the rights and permissions assigned to the mgmt2 and hr groups. You are logged on as root. Complete this lab from the Terminal. In this lab, your task is to:
  • Identify all the groups that the schawla user belongs to.
  • Answer Questions 1 and 2.
  • Add mgmt2 and hr as secondary groups for the schawla user, but make sure that the user is still a member of all current groups.
  • View the /etc/gro - ** VERIFIED ANSWERS 🔰 ✔✔ groups schawla usermod -aG mgmt2,hr schawla groups schawla 7.1. Your manager wants to verify information regarding the users on this system. Complete this lab from the Terminal. In this lab, your task is to:
  • View the contents of the file that contains the user information.
  • Answer the questions. - ** VERIFIED ANSWERS 🔰 ✔✔ cat /etc/passwd

You need to ensure that email is routed from the internet to your mail server. You want to know the mail server address for corpnet.xyz. Complete this lab from the Terminal. In this lab, your task is to:

  • Query the default DNS server for the primary IP address of the corpnet.xyz domain.
  • Query the default DNS server for the corpnet.xyz mail server and determine its IP address.
  • Confirm the corpnet.xyz mail server information by querying the external DNS server (ns1.nethost.net). - ** VERIFIED ANSWERS 🔰 ✔✔ nslookup corpnet.xyz nslookup -type=mx corpnet.xyz nslookup corpnet-www3.corpnet.xyz nslookup -type=mx corpnet.xyz ns1.nethost.net 8.14. An employee in another department recently provided several important files for your current assignment. The files are compressed in a tar file. You need to extract each file so you can begin to use them. Complete this lab from the Terminal. In this lab, your task is to:
  • Extract the files in /proj_files.tar.gz into the /projects directory.
  • Answer the question. - ** VERIFIED ANSWERS 🔰 ✔✔ tar -xzf /proj_files.tar.gz -C /projects ls -l /projects 2.8.

Your system administrator has scheduled a system update. The administrator has asked that everyone log out of their systems and leave them running. In this lab, your task is to:

  • Log out of the system while leaving the system powered on. - ** VERIFIED ANSWERS 🔰 ✔✔ logout 6.3. Your company wants to implement a local search engine for your intranet. The htdig software found in the repositories will provide the needed functions. Complete this lab from the Terminal. In this lab, your task is to:
  • Check for updates.
  • Install the latest version of htdig on your Debian-based machine. - ** VERIFIED ANSWERS 🔰 ✔✔ apt update apt install htdig Y 2.3. In this lab, you will explore the nano editor by configuring DNS name resolution on the IT-Laptop computer. In this lab, your task is to:
  • Use nano to open the /etc/resolv.conf file.
  • Modify the file by replacing the existing nameserver information with the following information: nameserver 163.128.78. nameserver 163.128.80.
  • Save the changes made to the file. - ** VERIFIED ANSWERS 🔰 ✔✔ nano /etc/resolv.conf nameserver 163.128.78. nameserver 163.128.80. Ctrl + O Ctrl + X 8.8. The system is running hard disk quotas for users and groups. Complete this lab from the Terminal. In this lab, your task is to:
  • Disable the quotas on the root directory (/). - ** VERIFIED ANSWERS 🔰 ✔✔ quotaoff / 7.3. Linda Blaine (lblaine) and Rhonda Conger (rconger) are temporary employees who were auditing your organization's financial documents. Their user accounts are members of the auditors group. They have completed their work and have moved on to new assignments. You need to remove their user accounts, home directories, and the auditors group from the system. Complete this lab from the terminal. In this lab, your task is to:
  • Delete the following user accounts and their corresponding home direc - ** VERIFIED ANSWERS 🔰 ✔✔ userdel -r lblaine userdel -r rconger groupdel auditors cat /etc/group ls /home 2.2.

While working on your Linux server, you want to enable anaconda.service and disable vmtoolsd.service using the systemctl command. In this lab, your task is to complete the following:

  • Use the systemctl command to enable anaconda.service.
  • Use the systemctl command to disable vmtoolsd.service.
  • After each command, verify that the service has been enabled or disabled appropriately with the systemctl command. - ** VERIFIED ANSWERS 🔰 ✔✔ systemctl enable anaconda.service systemctl is-enabled anaconda.service systemctl disable vmtoolsd.service systemctl is-enabled vmtoolsd.service 8.8. You are an IT administrator for your company's Linux system. You need to generate a quota report for your supervisor regarding the quota usage for the system. Complete this lab from the Terminal. In this lab, your task is to:
  • Use the applicable command to generate a quota report for all filesystems.
  • Answer the questions. - ** VERIFIED ANSWERS 🔰 ✔✔ repquota -a 8.5. You recently upgraded your computer and added an extra 512 MB of RAM. Consequently, you want to increase your swap space by adding a new swap area. The second hard disk has an unused partition (/dev/sdb2) that you want to format for the swap area. Complete this lab from the Terminal. In this lab, your task is to:
  • Create a swap partition on /dev/sdb2.
  • Activate the swap partition. - ** VERIFIED ANSWERS 🔰 ✔✔ mkswap /dev/sdb swapon /dev/sdb

The IT manager in your organization has asked you to install an open-source volume control and audio effects tool named PulseAudio-Equalizer. In this lab, your task is to:

  • Install the pulseaudio-equalizer.noarch package. - ** VERIFIED ANSWERS 🔰 ✔✔ dnf install pulseaudio-equalizer.noarch 7.3. Corey Flynn (cflynn) currently belongs to several groups. Due to some recent restructuring, he no longer needs to be a member of the hr group. Complete this lab from the Terminal. In this lab, your task is to:
  • Find the groups to which Corey currently belongs.
  • Answer Question 1.
  • Remove cflynn from the hr group while preserving all other group memberships.
  • View the /etc/group file or use the groups command to verify the changes.
  • ** VERIFIED ANSWERS 🔰 ✔✔ groups cflynn usermod -G mgmt1,it cflynn groups cflynn 8.10. An assistant administrator has been modifying permissions on the /hr directory. You want to quickly change the permissions on /hr to match the permission settings documented in your company's security policy. You must modify the directory permissions to be drwxr-xr-x (the octal equivalent of 111 101 101 = 755). Complete this lab from the Terminal. In this lab, your task is to:
  • Determine the current permissions for the /hr directory.
  • Answer the question.