TestOut Linux Pro Exam

Ace your homework & exams now with Quizwiz!

11.1.10 You are an IT manager. One of your job duties is monitoring system logs for the Linux systems on your network. The Journald service is collecting and storing system log data. Complete this lab from the Terminal. In this lab, your task is to: - Display the kernel message log from the current boot. - Display the system log in reverse order with the newest entries first.

journalctl -k q journalctl -r q

2.8.6 You are working with the files and directories on your Linux system. Complete this lab from the Terminal. In this lab, your task is to: - Locate your current working directory. - Answer Question 1. - View the detailed information for the /hr directory. - Answer Questions 2 and 3. - See if there are any hidden files in the /hr directory. - Answer Question 4.

pwd ls -l / ls -a /hr

8.8.6 You are logged on as the root user. Will Adams (wadams) has forgotten the system quotas that you configured for him. He has asked that you remind him. Complete this lab from the Terminal. In this lab, your task is to: - Use the applicable quota command to view Will's quotas. - Answer the questions.

quota -u wadams

8.8.8 To prevent users from using too much disk space, you have implemented hard and soft quotas on the root directory (/). Today, you noticed that the quotas are turned off. Complete this lab from the Terminal. In this lab, your task is to: - Re-enable quotas for users and groups on the root directory (/).

quotaon /

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

repquota -a

2.9.10 The White Horse project (which you, Will Adams, have been working on) is complete. Everything produced under the code name has been backed up and removed from the server. You now need to remove the White Horse directory structure from your local system. Complete this lab from the Terminal. In this lab, your task is to: - Use a single command to delete the /home/wadams/wh directory and all of its contents.

rm -rf wh

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.

rpm -e ddd-C-Debug-2.8.15-3.cd15 rpm -q ddd-C-Debug-2.8.15-3.cd15

7.2.9 Salman Chawla (schawla) forgot his password and needs access to the resources on his computer. You are logged on as wadams. The password for the root account is 1worm4b8. In this lab, your task is to: - Change the password for the schawla user account to G20oly04 (0 is a zero). - Make sure that the password is encrypted in the shadow file.

su -c "passwd schawla" 1worm4b8 G20oly04 G20oly04

12.2.8 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:

IT Laptop ---------- ping -c4 192.168.0.30 ping -c4 199.92.0.32 ping -c4 192.168.0.5 ping -c4 163.128.78.93 cd /etc/sysconfig/network-scripts ls cat ifcfg-enp2s0 Office 2 ----------- traceroute 198.28.56.1 traceroute 163.128.78.93

8.8.4 You are concerned that you may be getting low on disk space. You want to check and see if that assumption is correct. Complete this lab from the Terminal. In this lab, your task is to: - Use the applicable command to view the current disk space in human readable form. - To find the correct option, use man command. - Answer the questions.

df -h

4.2.5 The IT manager has asked you to set up dual-boot capabilities on a Linux system so that the system boots to Windows 10 by default, but can also boot to Linux if needed. There's an external hard drive connected to this system with Windows 10 installed. You need to configure GRUB2 to have your system boot to the Windows operating system by default. In this lab, your task is to: - Change the default menu option for the GRUB2 boot loader to Windows 10. - Write the new GRUB settings to the grub.cfg file. - Reboot the machine and confirm that it boots to the Windows 10 operating system by default.

nano /etc/default/grub (Make GRUB_DEFAULT=Windows 10 the new third line of the file.) Ctrl+X grub2-mkconfig -o /boot/grub2/grub.cfg reboot

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

ps aux | less q kill -9 1301 kill -9 1570 kill -9 1980

4.5.5 The power has gone out in your facility. You have an Uninterruptible Power Supply (UPS) that protects your system and provides enough power to allow you to shut down safely. In this lab, your task is to immediately shut down the system using the command line.

shutdown -h now

11.2.4 You have been doing some testing on your Linux system and now need to know how long the system has been running. Complete this lab from the Terminal. In this lab, your task is to: - Use the applicable command to determine: - The date on which the server was last started. - The time the server was last started. - Answer the questions.

uptime -s

7.2.6 Brenda Cassini (bcassini) was recently married. Her name is now Brenda Palmer. You need to update her user account to reflect her new last name. In this lab, your task is to: - Rename Brenda's user account bpalmer. - Change the comment field to read Brenda Palmer. - Change Brenda's home directory to /home/bpalmer, moving the contents of the old home directory to the new location. - View the /etc/passwd file and the /home directory to verify the modification.

(usermod -c "Brenda Palmer" -d /home/bpalmer -m -l bpalmer bcassini) cat /etc/passwd ls /home

8.12.5 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: /usr/bin/wall /usr/bin/write - Leave permissions on the files as they are.

chmod u-s /usr/bin/gpasswd chmod u-s /usr/bin/newgrp chmod g-s /usr/bin/wall chmod g-s /usr/bin/write

8.9.5 Brenda Cassini (bcassini) is taking over payroll documentation for Will Adams (wadams). In this lab, your task is to give the bcassini user ownership of the /hr/payroll file.

ls -l /hr chown bcassini /hr/payroll ls -l /hr

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

mkfs -t ext3 /dev/sdb1

8.5.9 You've installed a third hard drive (sdc) and created two partitions on the drive. Now you need to format both partitions. Complete this lab from the Terminal. In this lab, your task is to: - Format the two partitions with the ext4 file system.

mkfs -t ext4 /dev/sdc1 mkfs -t ext4 /dev/sdc2

4.2.4 The IT manager in your organization has asked you to change the GRUB_TIMEOUT parameter from 5 seconds to 10 seconds in order to give users more time to make a menu selection from the GRUB menu before the default operating system is booted. In this lab, your task is to: - Change the GRUB_TIMEOUT parameter from 5 seconds to 10 seconds. - Write the new GRUB settings to the grub.cfg file. - Reboot the operating system to verify the changes made to the wait time from the GRUB menu.

nano /etc/default/grub GRUB_TIMEOUT=10 (first line) Ctrl + X update-grub reboot

2.3.7 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.93 nameserver 163.128.80.93 - Save the changes made to the file.

nano /etc/resolv.conf nameserver 163.128.78.93 nameserver 163.128.80.93 Ctrl + O Ctrl + X

7.2.8 You use a special user account called Administrator to log on to your computer. However, you think that someone has learned your password. You are currently logged on as Administrator. In this lab, your task is to: - Change your password. - The current Administrator account uses 7hevn9jan as the password. - New password: r8ting4str

passwd 7hevn9jan r8ting4str r8ting4str

6.1.6 There is a kernel tools package installed on the server. The IT manager in your organization has asked you to upgrade the package using the new package version, kernel-tools-10.21.2015-54.fc21.rpm, located in the /root directory. Complete this lab from the Terminal. In this lab, your task is to upgrade the kernel tools package using the new package version, kernel-tools-10.21.2015-54.fc21.rpm.

rpm -Uv kernel-tools-10.21.2015-54.fc21.rpm

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

tar -xzf /proj_files.tar.gz -C /projects ls -l /projects

8.14.3 You need to create a backup copy of the /sales directory. You have decided to use tar to create the backup. Complete this lab from the Terminal. In this lab, your task is to: - Create a compressed archive of the /sales directory and all of its contents. - Name the file /salesbkp.tar.gz and save it in the root directory (/).

tar -zcf /salesbkp.tar.gz /sales

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

top kthreadd 0

7.2.7 Terry Haslam (thaslam) was dismissed from the organization. His colleagues have harvested the files they need from his home directory and other directories. Your company's Security Policy states that upon dismissal, users accounts should be removed in their entirety. In this lab, your task is to: - Remove the thaslam user account and home directory from the system. - View the /etc/passwd file and /home directory to verify the account's removal.

userdel -r thaslam cat /etc/passwd ls /home

4.4.4 While working on your Linux server, you want to practice starting, stopping, and restarting a service using the systemctl command. In this lab, your task is to: - Use the systemctl command to start bluetooth.service. - Use the systemctl command to stop bluetooth.service. - Use the systemctl command to restart bluetooth.service.

systemctl start bluetooth.service systemctl stop bluetooth.service systemctl restart bluetooth.service

8.10.5 A change in company policy requires users in the hr group to make changes to the files in the /hr directory. Complete this lab from the terminal. In this lab, your task is to: - Give the Write group permission to the files in the /hr directory in addition to any existing permissions. - Use the ls command to verify the changes.

chmod g+w /hr/* ls -la /hr

4.5.7 You have encountered system problems that require you to reboot the Linux server. You want to inform users that the system will shut down and reboot. In this lab, your task is to send a command to reboot the system in 5 minutes.

shutdown -r +5

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.

cat /root/.bash_profile cat /etc/shells

9.1.6 You are an IT administrator for a Linux system. Your supervisor has asked you to collect some information about the system. Complete this lab from the Terminal. In this lab, use the files in the /proc directory to: - Determine how many CPUs are installed. - Find the system's CPU speed. - Answer Questions 1 and 2. - Find the total physical memory. - Answer Question 3. - Find the Linux kernel version. - Answer Question 4.

cd /proc ls cat cpuinfo cat meminfo cat version

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

ls -l /hr chgrp hr /hr/personnel ls -l /hr

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

mkdir /mnt/disk mount -t ext3 /dev/sdb1 /mnt/disk mount

6.1.4 The IT manager in your organization has asked you to install the fontconfig-3.10.87-5.fc24.rpm package. Complete this lab from the terminal. In this lab, your task is to: - Switch to the root user using a password of 1worm4b8. - Install the fontconfig-3.10.87-5.fc24.rpm package.The package is located in the /home/wadams/Downloads directory. - Verify that the fontconfig package has been installed.

su - 1worm4b8 rpm -ivh /home/wadams/Downloads/fontconfig-3.10.87-5.fc24.rpm rpm -q fontconfig

15.1.7 Your organization has added three development servers that will not be part of the Domain Name Service (DNS). To be able to access these servers more easily, you want to add them to the /etc/hosts file. Complete this lab from the Terminal. In this lab, your task is to: - Use the applicable commands to edit the /etc/hosts file using either the nano or vim editors. - Use the cat command to verify the changes.

sudo nano /etc/hosts 6or7en 192.168.122.84 potato.corpnet.local potato 192.168.122.85 radish.corpnet.local radish 192.168.122.86 lettuce.corpnet.local lettuce Ctrl+X y cat /etc/hosts

4.3.4 You are the system administrator, and your Linux server is not functioning properly. To begin your troubleshooting process, you have decided to boot your server into rescue mode. In this lab, your task is to: - Set the default target to rescue.target. - Verify that the current default target is rescue.target.

systemctl set-default rescue.target systemctl get-default

2.3.5 You need to create a script file to change and export the SHELL environmental variable as the C shell. You have decided to use the vim editor to do this. In this lab, your task is to: - Use vim to open a new file named /etc/pref_shell. - Add the following lines to the new file: SHELL=/bin/csh export SHELL - Save and close the file.

vim /etc/pref_shell i SHELL=/bin/csh export SHELL Esc : wq

14.4.5 Your company has begun using Git to help track changes for the files being developed for several projects. You have already cloned and are working with a repository named repo1. The repo1 repository has been cloned to your /home/vedwards/projects folder. In this lab, your task is to use Git to: - Pull updates for the repo1 repository from the remote Git server to your local machine. - Clone the repo2 repository from the remote Git server to your projects folder on your local machine.

cd projects/repo1 ls -la git pull ls -l cd .. git clone repo2 ls -l

9.2.4 You just got a new PowerMate input device that you want to use on your computer. You do not think that the PowerMate driver was compiled into the kernel of your Linux distribution. Complete this lab from the Terminal. In this lab, your task is to: - Verify that the device driver was not inserted into the kernel. - Insert the powermate module into the kernel. - Confirm that you have loaded the module into the kernel.

lsmod modprobe powermate lsmod

12.7.5 You are the IT administrator for a small corporate network. You have set up an internal web server to do some testing. You would like to obscure the server some by changing the default ports. Complete this lab from the Terminal. In this lab, your task is to: - Use ss -lt and netstat -a to determine which ports the web server is running on. - Modify the ports.conf file to change port 80 to 81 and port 8080 to 8081. - Restart the web server to implement the port change. - Use netstat -a and ss -lt to verify that the server is listening on the new ports.

ss -lt netstat -a nano /etc/apache2/ports.conf (80 - 81, 8080 - 8081) Ctrl + X systemctl restart apache2 ss -lt netstat -a

15.1.5 Earlier in the day, you created a user account for Brenda Cassini (bcassini). When she tries to log in, she is unsuccessful. You realize that you misspelled her username as bcasini. You are logged on as wadams, so you will have to address this issue as the root user. The root password is 1worm4b8. Complete this lab from the Terminal. In this lab, your task is to: - Change the login name from bcasini to bcassini. - Change the home directory to /home/bcassini. - When you are finished, view the /etc/passwd file to verify the changes.

su - 1worm4b8 usermod -l bcassini bcasini usermod -d /home/bcassini bcassini cat /etc/passwd

7.3.5 Maggie Brown (mbrown) and Corey Flynn (cflynn) have recently been hired in the Human Resources department. You have already created their user accounts. In this lab, your task is to: - Add the hr group as a secondary group for the mbrown and cflynn user accounts. - View the /etc/group file or use the groups command to verify the changes.

usermod -G hr mbrown usermod -G hr cflynn groups mbrown groups cflynn

7.2.10 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 accounts: vedwards cflynn bkahn - Unlock the following user accounts: mbrown bcassini aespinoza - View the /etc/shadow file to verify the changes.

usermod -L vedwards usermod -L cflynn usermod -L bkahn usermod -U mbrown usermod -U bcassini usermod -U aespinoza cat /etc/shadow

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

cd /projects rmdir heartbt heartmon heartstrng ls -l /projects

7.3.4 All the sales people in your company currently belong to a group named sales. The VP of sales wants to have two sales groups, one for the western division and one for the eastern division. In this lab, your task is to: - Rename the existing sales group western_sales. - Create the new eastern_sales group. - Remove aespinoza as a member of the western_sales group. - Assign aespinoza as a member of the eastern_sales group. - When you're finished, view the /etc/group file or use the groups command to verify the changes.

groupmod -n western_sales sales groupadd eastern_sales usermod -G eastern_sales aespinoza groups aespinoza

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

ps aux | less

12.8.5 Your Linux system named Support has been running slow when trying to access a remote computer on the internet. To help troubleshoot the issue, you want to know what route your computer is using to access the remote computer. Complete this lab from the Terminal. In this lab, your task is to: - Use the exhibits to locate the IP address of the external DNS server. - Answer Question 1. - Use the command necessary to find the route used to access the external DNS server.Answer Questions 2 through 5. - Use the command necessary to find the route used to access the remote computer using the 10.10.20.10 IP address. - Answer Questions 6 and 7.

--Exhibits-- traceroute 163.128.78.93 traceroute 10.10.20.10

7.1.6 Your manager wants to verify information regarding the various groups 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 group information. - Answer the questions.

cat /etc/group

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

ip addr ip link set enp2s1 up ip addr show enp2s1

8.10.6 The human resources team uses the /hr directory to keep important employee documents. Over time, you notice that permissions set on each file have become inconsistent. You want to make sure that all files in the /hr directory have the same permissions settings. You must modify the file permissions to be -rw-rw---- (the octal equivalent of 110 110 000 = 660). Complete this lab from the Terminal. In this lab, your task is to: - Configure permissions on all files in the /hr directory as follows: - User and group owners should have Read and Write permissions to the files. - All other users should have no permissions on any file. - Use the ls command to verify your changes.

chmod 660 /hr/* ls -la /hr

8.10.7 The Sales team uses the /sales directory to store documents related to sales, contacts, and orders. Currently, permissions on the directory only allow the user and group owners to view the contents of the directory. Users who are not part of the group owner are unable to list the contents of the directory. As part of a new company policy to increase teamwork, you want to allow all users to be able to see the /sales directory and list its contents. You also want to let all users open any document inside that directory, but you do not want them to make changes to the documents. Complete this lab from the Terminal. In this lab, your task is to: - Allow the group other to browse the /sales directory. - Modify permissions on all files in the /sales directory to allow members of the other group to view the files, but prohibit them from changing them.

chmod o+rx /sales chmod o+r /sales/*

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

dnf install pulseaudio-equalizer.noarch

2.5.4 You have been having difficulties with some of your applications running properly on your Linux system. You suspect that some of your environment variables may not be configured correctly. Complete this lab from the Terminal. In this lab, your task is to: - View the value of the following environment variables: HOME LANG SHELL TERM - Answer the questions.

echo $HOME echo $LANG echo $SHELL echo $TERM

8.2.5 You are thinking about adding another disk to your system. To help you make your decision, you want to view the current setup. Complete this lab from the Terminal. In this lab, your task is to: - View the disk information for your system. - Answer the questions.

fdisk -l

8.13.4 The wadams user needs access to a file in the /sales folder on your system, but does not belong to the sales group. In this lab, your task is to use ACL utilities to: - Check the permissions on the /sales/forecast.txt file. - Grant full rights for the /sales/forecast.txt file to wadams.

getfacl /sales/forecast.txt setfacl -m u:wadams:rwx /sales/forecast.txt getfacl /sales/forecast.txt

10.3.10 You are the IT administrator for a small corporate network. You want to run a task that will automatically update one of your databases on a regular basis. Complete this lab from the Terminal. In this lab, your task is to: - Create a crontab file for the root user. - Add parameters to the file that will run the /bin/updatedb command every Tuesday and Saturday at 2:30 a.m.

crontab -l crontab -e 1 (On the blank line, type) 30 2 * * 2,6 /bin/updatedb Ctrl + x crontab -l

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

logout

8.7.4 You suspect that one of the storage devices on your system has failed. Your need to identify which device it is. In this lab, your task is to: - Find out if a device has failed. - Use the appropriate command to list devices and their utilization. - Answer the question.

iostat

12.2.10 You have experienced some network connectivity issues, and you suspect the issue may be one of the NICs in your computer. Complete this lab from the Terminal. In this lab, your task is to: - Stop the enp2s1 NIC as the first step to isolating the problem. - Verify that enp2s1 is down.

ip link set enp2s1 down ip addr

2.2.4 You are a student learning how to use Linux. Your teacher has given you the assignment to learn how to use a few basic commands. Complete this lab from the Terminal. In this lab, your task is to: - Learn the options available for the killall command. - Answer Question 1. - Learn the options available for the useradd command. - Answer Question 2. - Learn the options available for the usermod command. - Answer Question 3.

killall --help useradd --help usermod --help

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

ln -s /root/imitator /home/mbrown/imitator_link

2.10.4 Will Adams (wadams) owns and maintains a database file in the /home/wadams directory called contacts.db. The file holds contact information for perspective clients. Brenda Cassini (bcassini) and Vera Edwards (vedwards) want to access and add contact information to the file to share the data among the three users. You have decided to meet their request using a hard link. In this lab, your task is to create hard link files to /home/wadams/contacts.db as follows: - Create the file in the following directories: /home/bcassini /home/vedwards - Use contacts_link as the name for the new hard links.

ln /home/wadams/contacts.db /home/bcassini/contacts_link (^^^ ALL ONE COMMAND ^^^) ln /home/wadams/contacts.db /home/vedwards/contacts_link (^^^ ALL ONE COMMAND ^^^)

8.10.4 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. - Modify the permissions on the /hr directory as follows: User: Read, Write, Execute Group: Read, Execute Other: Read, Execute

ls -la /hr chmod 755 /hr ls -l / rwxr--r--?

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

lsmod rmmod gameport lsmod

2.8.7 You are preparing to manage a new project, which is code named White Horse. You need to prepare directories for White Horse documents. You are logged in as the wadams user. In this lab, your task is to complete the following: - From the command line, create a directory called wh in /home/wadams. - Also from the command line, create the following directories in /home/wadams/wh: - implement - plan - research - Use the ls command to verify the creation of the directories.

mkdir wh cd wh mkdir implement mkdir plan mkdir research ls -l /home/wadams/wh

8.8.9 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 (/).

quotaoff /

0.1.3 In this lab, you will use several commands from the Terminal to manage files. You are currently in the wadams home directory (/home/wadams). In this lab, your task is to: - Use the rm command to delete the old_myfile.txt file found in your home directory. - Use the touch command to create the new_myfile.txt file in your home directory. - Use nano or vi to add some text of your choosing to the new_myfile.txt file you just created. - Use the cat command to view the changes you made to the file. - Use the cp command to copy the new_myfile.txt file to the /home/wadams/practice directory. - Use the mv command to rename /home/wadams/practice/new_myfile.txt to final_myfile.txt.

rm old_myfile.txt touch new_myfile.txt nano new_myfile.txt (add some text) cat new_myfile.txt cp new_myfile.txt /home/wadams/practice mv new_myfile.txt final_myfile.txt

2.9.9 As part of a security sweep of your systems, you need to check to see if the /etc/hosts file has been tampered with. Complete this lab from the Terminal. In this lab, your task is to: - Find out if the modified date for the /etc/hosts file is different from its creation date.Use the appropriate command that lists both modify time and creation time. - Answer the questions.

stat /etc/hosts

2.9.8 Peter Lacy (placy) has taken an extended leave from the company for personal reasons. However, he was working on a critical project code named White Horse with several other employees. The project leader requested that you move any White Horse documents in Peter Lacy's home directory to Brenda Cassini's (bcassini's) home directory. You're logged on as wadams. Complete this lab from the Terminal. In this lab, your task is to: - Switch to the root user using 1worm4b8 for the root user password. - You must have root user permissions to move other people's files. - Move the following files from Peter's home directory (placy) to Brenda's home directory (bcassini). - confid_wh - projplan_wh - Use the ls command to verify the files' new location.

su - 1worm4b8 cd /home/placy mv confid_wh ../bcassini mv projplan_wh ../bcassini ls -l ls -l /home/bcassini

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

systemctl enable anaconda.service systemctl is-enabled anaconda.service systemctl disable vmtoolsd.service systemctl is-enabled vmtoolsd.service

7.3.7 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 directories: lblaine rconger - Delete the auditors group. - View the /etc/group file to verify the changes.

userdel -r lblaine userdel -r rconger groupdel auditors cat /etc/group ls /home

7.3.9 Salman Chawla (schawla) is no longer part of the sales team and is waiting to be assigned a new position. In the meantime, you do not want him to have access to sales resources. Complete this lab from the Terminal. In this lab, your task is to: - Remove the schawla user from all secondary group memberships. - View the /etc/group file to verify the changes.

usermod -G "" schawla groups schawla

15.1.8 To limit the number of people who know the root password on the computer used by the marketing team, you need to designate a user that can use sudo to manage the system. You are currently logged in as the root user. Complete this lab from the Terminal. In this lab, your task is to: - Use the applicable utility to give wadams sudo privileges as a regular user. - Verify that the change has taken effect as follows: - Use the su - wadams command to switch to the wadams account. - As the wadams user, try to use the touch command to change the modified date and time of the /etc/hosts file. - As the wadams user, try to use the sudo touch command to change the modified date and time of the /etc/hosts file. 6or7en wadams' password. - Use the ls command to view the modified date and time of the /etc/hosts file.

visudo 1 Enter (add a line) wadams ALL=(ALL) ALL Ctrl + X su - wadams touch /etc/hosts sudo touch /etc/hosts 6or7en ls -l /etc/hosts

12.8.6 You are a network technician for a small corporate network, which is connected to the internet. Several issues have recently come up. - The employee in the Support Office reports that their workstation cannot communicate with any other computers on the network and cannot connect to the internet. - The employee in Office 2 reports that their workstation can communicate with some computers on the network, but cannot access the internet. - In addition to these two issues, you have just set up your workstation in the IT Administration office, and the workstation does not connect to any computers on the network. You need to diagnose and fix these problems. In this lab, your task is to: - Use troubleshooting tools such as ping, ip addr show, and route to diagnose the problems in the network. - Fix the problem at each workstation. - Use the troubleshooting tools to confirm each problem's resolution. The following table lists what should be the correct IP address for each computer:

Support Terminal ----- ping -c4 192.168.0.5 ping -c4 192.168.0.30 ip addr nano /etc/sysconfig/network-scripts/ifcfg-enp2s0 IPADDR: 192.168.0.32 BROADCAST: 192.168.0.255 GATEWAY: 192.168.0.5 Ctrl-X ip link set enp2s0 down ip link set enp2s0 up ip addr ping -c4 192.168.0.5 ping -c4 163.128.80.93 Office 2 Terminal ----- ping -c4 192.168.0.5 ping -c4 192.168.0.30 ping -c4 163.128.80.93 route nano /etc/sysconfig/network-scripts/ifcfg-enp2s0 GATEWAY: 192.168.0.5 ip link set enp2s0 down ip link set enp2s0 up ping -c4 163.128.80.93 ITAdmin Terminal ----- ping -c4 192.168.0.5 ping -c4 192.168.0.30 ip addr nano /etc/sysconfig/network-scripts/ifcfg-enp2s0 NETMASK: 255.255.255.0 ip link set enp2s0 down ip link set enp2s0 up ping -c4 192.168.0.30

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

apt update apt install htdig Y

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

cat /etc/passwd

2.9.7 Someone created duplicate versions of three project documents. To avoid version control problems, you need to delete the duplicate files. When deleting the files, use the switch that will allow you to delete a file without any promptings. Complete this lab from the Terminal. In this lab, your task is to: Delete the following files from the /projects directory: - darkhorse1 - camouflage1 - endgame1 When you are finished, use the ls command to verify the deletion.

cd /projects rm -f darkhorse1 rm -f camouflage1 rm -f endgame1 ls -l

8.12.4 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/xmms program. - Do not change any other permissions on the file.

chmod 4755 /usr/bin/xmms

8.9.7 During a random security audit, you found that the user and group ownership for the /hr directory is set to Will Adams (wadams). For security reasons, you need to change the ownership. You want to give ownership to Brenda Cassini (bcassini), the office manager, and you want to give group ownership to the hr group for all the files in the directory. After you do this, you need to reset group ownership on the /hr/personnel file to mgmt1. Complete this lab from the Terminal. In this lab, your task is to: - Give bcassini ownership of the /hr directory and all of its contents. - Give the hr group ownership of the /hr directory and all of its contents. - Return group ownership of the /hr/personnel file to mgmt1.

chown -R bcassini:hr /hr chgrp mgmt1 /hr/personnel

6.2.6 RunSnakeRun is a Python GUI package installed on the server. Since this utility is no longer being used, the IT manager has asked you to uninstall the package. Complete this lab from the Terminal. In this lab, your task is to: - Use the dnf command to uninstall the RunSnakeRun.noarch package.

dnf remove RunSnakeRun.noarch

8.8.5 You are logged on as Will Adams (wadams), and your working directory is /home/wadams. You need to know some information about the disk usage for Will's home directory. Complete this lab from the Terminal. In this lab, your task is to: - Use the applicable command to view the disk usage for the /home/wadams directory. - Answer the questions.

du

8.8.11 Users have complained that the seven-day default grace period for soft limits is too short. Complete this lab from the Terminal. In this lab, your task is to: - Increase the block and file (inode) grace period for users from 7 to 30 days. - Generate a quota report to confirm the changes.

edquota -u -t 1 (block + inode 7-30) Ctrl + X repquota -a

8.8.10 Listen to simulation instructions Sam Chan (schan) has reached his user quota limit, and he wants more space. Your manager has approved an increase in his quota limit. Complete this lab from the Terminal. In this lab, your task is to: - Increase the hard and soft block limits on the schan user account to 1048576 KB (1 GB). - Generate a quota report to confirm the changes.

edquota -u schan 1 (soft + hard - 1048576) Ctrl + X repquota -a

2.12.8 Vera Edwards (vedwards) was recently hired as a new salesperson for your company. She cannot access the files in the sales folder and has asked for your help. Although you thought you had added her to the group, you want to verify this on her system. When you arrive to help her, she tells you that she cannot find a proposal file she has written, and she would like you to help her find it. Complete this lab from the Terminal. In this lab, your task is to use grep to: - Find the current members of the /etc/group named sales. - Answer Question 1. - Find which proposal file contains the phrase The Fluid Data. - The file is either in her home directory or in one of her sub-directories. - Answer Question 2.

grep sales /etc/group grep -r "The Fluid Data" *

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

groups cflynn usermod -G mgmt1,it cflynn groups cflynn

7.3.6 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/group file to verify the changes.

groups schawla usermod -aG mgmt2,hr schawla groups schawla

12.2.11 You are the IT administrator for a small corporate network. You need to configure the workstation in the Support Office so that the workstation can connect to the local network and the internet. Complete this lab from the Terminal. In this lab, your task is to: - Configure the IP version 4 TCP/IP settings for the enp2s0 network connections as follows: - IP address: 192.168.0.254 - Subnet mask: 255.255.255.0 - Broadcast: 192.168.0.255 - Default gateway: 192.168.0.5 Configure DNS using the following addresses: - 163.128.78.93 - 163.128.80.93 Use the following steps to test the corrections to the enp2s0 interface card: - Ping the gateway to confirm that the workstation is properly connected to the small network. - Ping the external DNS server to confirm that the workstation is properly connect to the internet. - Ping an external web server (www.corpnet.xyz) to confirm that DNS is configured properly.

ip addr show cd /etc/sysconfig/network-scripts ls nano ifcfg-enp2s0 - IP address: 192.168.0.254 - Subnet mask: 255.255.255.0 - Broadcast: 192.168.0.255 - Default gateway: 192.168.0.5 Ctrl + X nano /etc/resolv.conf nameserver 163.128.78.93 nameserver 163.128.80.93 Ctrl + X ip link set enp2s0 down ip link set enp2s0 up ping -c4 192.168.0.5 ping -c4 163.128.80.93 ping -c4 www.corpnet.xyz

12.7.6 As the IT administrator for a small corporate network, you periodically check the firewall configuration on the Linux server to make sure everything is secure. Complete this lab from the Terminal. In this lab, your task is to: - Use the applicable command needed to list the rules in all chains for your firewall. - Answer the question.

iptables -L

8.9.4 You are the IT administrator for this Linux system. Your manager has asked you to verify the ownership of a few files and directories. Complete this lab from the Terminal. In this lab, your task is to: - View the ownership for the /sales/orders file. - Answer Question 1. - View the ownership for the /projects/darkhorse file. - Answer Question 2. - View the ownership for the /projects directory. - Answer Question 3. - View the ownership for the /hr directory. - Answer Question 4.

ls -l /sales/orders bcassini ls -l /projects/darkhorse proj ls -l / bcassini sales

8.4.4 On your Linux system, you have installed a second hard drive and created one partition on the drive. You have also installed a third hard drive and created two partitions on that drive. You now want to create a logical volume using the first partition on each new drive. Complete this lab from the Terminal. In this lab, your task is to: - Use pvcreate to initialize the partitions for use with LVM. - Use vgcreate to create a volume group named data using these two partitions. - Use lvcreate to create a 1-terabyte logical volume named art from the data volume group. - Create a directory named product where you can mount the new logical volume. - Format the new logical volume with ext4. - Mount the logical volume to the product directory. - Change to the product directory and create a file named newproduct. - Verify the creation of the file and amount of disk space available on this new volume.

ls /dev/sd* pvcreate /dev/sdb1 /dev/sdc1 vgcreate data /dev/sdb1 /dev/sdc1 vgs lvcreate --size 1t -n art data mkdir product mkfs.ext4 /dev/data/art mount -t ext4 /dev/data/art product cd product touch newproduct ls df -h

8.1.5 You are considering adding an additional hard disk to your system. Before doing so, you need to find out what block devices are connected to your Linux system. Complete this lab from the Terminal. In this lab, your task is to: - Use the appropriate tool to list the block devices on your system. - Answer the questions.

lsblk 2 sda3

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

mkswap /dev/sdb2 swapon /dev/sdb2

12.6.5 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).

nslookup corpnet.xyz nslookup -type=mx corpnet.xyz nslookup corpnet-www3.corpnet.xyz nslookup -type=mx corpnet.xyz ns1.nethost.net

2.3.6 You have just added a custom script to change and export the SHELL environmental variable as the C shell. However, you decided to change from the C shell to tcsh. In this lab, your task is to: - Use vim to open the /etc/pref_shell file. - Modify the environmental variable line SHELL=/bin/csh to read SHELL=/bin/tcsh. - Save your changes.

vim /etc/pref_shell i SHELL=/bin/tcsh (add a t) Esc : wq

10.2.11 Explore putting a process in the background and then bringing it back to the foreground. Complete this lab as follows: - From the Favorites bar, select Terminal. - At the prompt, type ping localhost & and press Enter to launch ping in the background. Ping continues to run in the background and its output is shown on the screen. You can still interact with the console and run other commands in the foreground. - Press CTRL + C. This would normally stop the ping. However, the command is not recognized because ping is in the background. - Type cd /etc and press Enter. Notice that the path is changed. Type ls and press Enter. Notice that the output of ls is interspersed with the output of ping running in the background. - Type fg and press Enter to bring the ping command back to the foreground. Ping is now running in the foreground and the console will not allow other commands to be run. - Try to type ls. Notice that the typing is ignored. - Press CTRL + C. The ping command is now terminated since it is in the foreground.

ping localhost Ctrl+C cd /etc ls fg ls Ctrl+C

10.2.11 Explore putting a process in the background and then bringing it back to the foreground.

ping localhost & CTRL + C cd /etc ls fg ls CTRL + C

10.1.10 As a systems administrator, you will frequently need to identify the process ID (PID) of a running process. The pidof tool is specifically designed for this task. You are currently logged in as the root user. Complete this lab from the Terminal. In this lab, your task is to complete the following: Method 1: Find the PID for the rpc.mountd process as follows: - Use the ps aux command and redirect its output to the processes.txt file. - Use the grep command to search the processes.txt file to find the process ID of rpc.mountd. Method 2: Use the pidof command to find the process ID of rpc.mountd.

ps aux > processes.txt grep rpc.mountd processes.txt pidof rpc.mountd

4.5.6 You have informed your users that you need to bring the Linux server down at the end of the day to perform routine maintenance. However, prior to shutting the system down, you want to give users fifteen minutes to save data and exit the system. In this lab, your task is to: - Shut down the system using a 15-minute delay before shutting down. - Use The server is shutting down in 15 minutes as a message to all logged-in users.

shutdown -h +15 The server is shutting down in 15 minutes

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

systemctl isolate rescue.target 1worm4b8

8.11.4 You want to change your default umask to give yourself and members of the groups to which you belong full permissions to the files and directories you create. You want to deny permissions for everyone else. You are logged on as wadams. Complete this lab from the Terminal. In this lab, your task is to: - Change your default umask value to give yourself and members of the groups to which you belong full permissions to the files and directories that you create.

umask umask 007 umask

8.6.4 Listen to simulation instructions The /dev/sdb2 volume is mounted to an uncommon mount point directory, /root/newdrive. You need to remove the volume from the /root/newdrive mount point and remount it to the /mnt/drive2 directory. Complete this lab from the Terminal. In this lab, your task is to: - Unmount /dev/sdb2 from /root/newdrive. - Mount /dev/sdb2 to /mnt/drive2. - Use the mount command to verify that the volume is mounted correctly.

umount /root/newdrive mount /dev/sdb2 /mnt/drive2 mount

7.2.5 The VP of Marketing has told you that Paul Denunzio will join the company as a market analyst in two weeks. You need to create a new user account for him. In this lab, your task is to: - Create the pdenunzio user account.Include the full name (Paul Denunzio) as a comment for the user account. - Set eye8cereal as the password for the user account. When you're finished, view the /etc/passwd file to verify the creation of the account. - Answer the question.

useradd -c "Paul Denunzio" pdenunzio passwd pdenunzio - eye8cereal - eye8cereal cat /etc/passwd


Related study sets

Anatomy and Physiology Ch. 2 (Exam 1)

View Set

personal financial literacy: "Spending"

View Set

Indigenous Law IND - CHAPTER 1 - FILL IN

View Set

Conditions Occurring after Delivery

View Set

Lab 1: Spinal Cord and Spinal Nerves

View Set

Words Which Indicate A Past Tense {Passe Compose vs Imparfait}

View Set

Business Law: Nature of Contracts

View Set

ACCT 461: Ch 14 (Fraud risk assessment)

View Set

401 Prep U week 3 respiratory complications

View Set