CompTIA Linux+ V8 Exam Questions and Answers
A Linux administrator installed a new program inside $HOME/.local/bin and is trying to execute it without using an absolute path. Which of the following should the administrator use for this task?
An administrator needs to remove the directory /home/user1/data and all of its contents. Which of the following commands should the administrator use?
A systems administrator needs to check access to all company servers. The administrator uses the following script, which does not complete:
for i in $(cat /home/user1.file)
do
echo $i
ssh $i uptime
Which of the following is missing from the script?
A systems administrator is preparing a Linux system for application setup. The administrator needs to create an environment variable with a persistent value in one of the user accounts. Which of the following commands should the administrator use for this task?
An administrator wants to search a file named myFile and look for all occurrences of strings containing at least five characters, where characters two and five are i, but character three is not b. Which of the following commands should the administrator execute to get the intended result?
A Linux administrator needs to add a new HTTP service on the server. Which of the following commands allows other systems to communicate with the service after the system is restarted?
An administrator wants to start an Ubuntu terminal in a container. Which of the following will allow the administrator to complete the task?
A Linux user frequently tests shell scripts located in the /home/user/scripts directory. Which of the following commands allows the user to run the program by invoking only the script name?
Which of the following is the best use of AI within a Linux environment?
Which of the following utilities supports the automation of security compliance and vulnerability management?
A user reports Issues v/hen trying to connect to one ot the Linux servers. The server administrator reviews the following outputs:
Output 1:
Kernel panic not syncing: Fatal Machine check
Fid: 0, comm; swapper Tainted: G M ------------------ 4.18.0-553.8.1.cl8_10.x86_64 #1
Call Trace:
< #mc > [rrrrrrrrs:4er..i4i] ? panic+ox7n/oxi43
[] ? mcc_panic+0x21f/0x240
[] ? do_machine_check+0xal8/0xae0
[] ? intel idie+0xbi/0xi70
[] ? machino_check+0xlc/0x30
[] ? intel_idle+0xbl/0xl70
«EOE» [] ? hrtimer 8tart+0xlB/0x20
[] ? cpuidle_idle_cail+0xa7/0xl40
I| ? cpu_idle+0xbfc/0xll0
[] ? Start_secondary+0x202/0x245
Output 2:
[325926.243631] mce: [Error] : CPU 22: Machine Check Exception: 7 Bank 0: bd80000000000134
1325926.247004| nice: (Error): Machine check events logged
[325991.358038] race: [Error] : KIP 10: < ffffffff83584719* (copy user enhanced fast strir.q+0x9/0x20)
[325991.358038] mce: [Error] : tsc 31ea89256a735 ADDR 3cdl889000 MISC 8c
[325991.350033] mce: [Error] : PROCESSOR 0:50657 TIME 15945B1695 SOCKET 0 APTC 16 microcode rrrrtrrr
[325991.358038] mce: [Error] : Run the above through ' rr.ccloq —ascii*
[325991.358038] mce: [Error] : Machine check: Action required: unknown MCACOD
[325991.3511038] Kernel panic not syncing: Fatal machine check
Which of the following statements describes the cause and resolution for this issue?
An administrator added a new disk to expand the current storage. Which of the following commands should the administrator run first to add the new disk to the LVM?
Users cannot access a server after it has been restarted. At the server console, the administrator runs the following commands;
Which of the following is the cause of the issue?
A systems administrator manages multiple Linux servers and needs to set up a reliable and secure way to handle the complexity of managing event records on the OS and application levels. Which of the following should the administrator do?
A systems administrator needs to check the statuses of all the services on a Linux server. Which of the following commands accomplishes this task?
Which of the following passwords is the most complex?
Which of the following can be implemented with PAM to detect and block dictionary attacks?
A Linux administrator wants to use AI to deploy infrastructure as code. Which of the following is a best practice regarding the use of AI for this task?
Which of the following is a characteristic of Python 3?
An administrator is investigating the reason a Linux workstation is not resolving the website The administrator executes some commands and receives the following output:
Which of the following is the most likely cause?
A Linux administrator is testing a web application on a laboratory service and needs to temporarily allow DNS and HTTP/HTTPS traffic from the internal network. Which of the following commands will accomplish this task?
System users are being randomly disconnected from a server. The systems administrator inspects the following output:
# ping 192.168.1.1
--- 192.168.1.1 ping statistics ---
100 packets transmitted, 4 received, 96% packet loss
# ip -s link show
RX: errors 400000
TX: errors 150000
# ip route
default via 192.168.1.1 dev enp0s25 proto dhcp src 192.168.1.102 metric 600
Which of the following should the administrator do to fix the issue?
A Linux administrator notices that an application is having trouble connecting to an external database. Which of the following commands should the administrator use to validate the connection to the remote port exposed by a database server?
User1 reports " access denied " errors while trying to execute app. Given the following outputs:
Which of the following options will remediate this issue?
Which of the following commands can be used to display current CPU utilization in real time on a Linux system?
A Linux systems administrator makes updates to systemd-managed service configuration files. Which of the following commands should the administrator execute in order to implement the changes?
A systems administrator wants to review the logs from an Apache 2 error.log file in real time and save the information to another file for later review. Which of the following commands should the administrator use?
An administrator attempts to install updates on a Linux system but receives error messages regarding a specific repository. Which of the following commands should the administrator use to verify that the repository is installed and enabled?
Which of the following commands should a Linux administrator use to determine the version of a kernel module?
A systems administrator receives reports from users who are having issues while trying to modify newly created files in a shared directory. The administrator sees the following outputs:
Which of the following provides the best resolution to this issue?
A systems administrator wants to review the amount of time the NetworkManager service took to start. Which of the following commands accomplishes this goal?
You are a systems administrator and have created an uncompressed backup of the
application directory. Several hours later, you must restore the application from backup.
INSTRUCTIONS
Within each tab, click on an object to form the appropriate command used to create the
backup and restore the application.
Command objects may only be used once, and not all will be used. Click the arrow to
remove any unwanted objects from your command.
If at any time you would like to bring back the initial state of the simulation, please click
the Reset All button.
While hardening a system, an administrator runs a port scan with Nmap, which returned the following output:
Which of the following is the best way to address this security issue?
A Linux user needs to authenticate to a Windows Active Directory domain. Which of the following configuration files contains the domain configuration details?
A Linux administrator is configuring a CUPS print service on a Linux machine and needs to allow only connections from a local network (192.168.100.0/24). Which of the following commands should the administrator use?
A systems administrator attempts to edit a file as root, but receives the following error:
Which of the following commands allows the administrator to edit the file?
A DevOps engineer made some changes to files in a local repository. The engineer realizes that the changes broke the application and the changes need to be reverted back. Which of the following commands is the best way to accomplish this task?
A Linux systems administrator needs to extract the contents of a file named /home/dev/web.bkp to the /var/www/html/ directory. Which of the following commands should the administrator use?
A Linux administrator receives reports about MySQL service availability issues. The administrator observes the following information:
uptime -p shows the system has been up for only 2 minutes
journalctl shows messages indicating:
mysqld invoked oom-killer
mysqld cpuset=/ mems_allowed=0
Which of the following explains why the server was offline?
Which of the following commands would a Linux administrator use to determine the temperature of a motherboard?
An administrator is trying to terminate a process that is not responding. Which of the following commands should the administrator use in order to force the termination of the process?
(Partial question reconstructed from visible content)
Which of the following is the main reason for setting up password expiry policies?
After receiving a monitoring call, an administrator checks the Linux server for processes that have completed execution but have not been removed yet from the process table. Which of the following represents the process state for which the administrator should search?