[Jul-2023] CompTIA XK0-005 Official Cert Guide PDF
Exam XK0-005: CompTIA Linux+ Certification Exam - Lead1Pass
NEW QUESTION # 45
A Linux administrator rebooted a server. Users then reported some of their files were missing. After doing some troubleshooting, the administrator found one of the filesystems was missing. The filesystem was not listed in /etc/f stab and might have been mounted manually by someone prior to reboot. Which of the following would prevent this issue from reoccurring in the future?
- A. Remount all the missing filesystems
- B. Create a mount unit and enable it to be started at boot.
- C. Mount the filesystem manually.
- D. Sync the mount units.
Answer: A
NEW QUESTION # 46
When trying to log in remotely to a server, a user receives the following message:
The server administrator is investigating the issue on the server and receives the following outputs:
Which of the following is causing the issue?
- A. The wrong permissions are on the user's home directory.
- B. The user entered the wrong password.
- C. The account was locked out due to three failed logins.
- D. The user has the wrong shell assigned to the account.
Answer: D
NEW QUESTION # 47
To harden one of the servers, an administrator needs to remove the possibility of remote administrative login via the SSH service. Which of the following should the administrator do?
- A. Set PermitRootLogin to no in the /etc/ssh/sshd_config file.
- B. Set PubKeyAuthentication to no in the /etc/ssh/ssh_config file.
- C. Add the line account required pam_nologin. so to the /etc/pam.d/sshd file.
- D. Add the line DenyUsers root to the /etc/hosts.deny file.
Answer: A
NEW QUESTION # 48
A Linux system is failing to boot with the following error:
Which of the following actions will resolve this issue? (Choose two.)
- A. Interrupt the boot process in the GRUB menu and add single to the kernel line.
- B. Execute grub-install /dev/sdX and reboot.
- C. Fix the partition modifying /etc/default/grub and reboot.
- D. Boot the system on a LiveCD/ISO.
- E. Interrupt the boot process in the GRUB menu and add rescue to the kernel line.
- F. Execute grub-install --root-directory=/mnt and reboot.
Answer: B,C
NEW QUESTION # 49
A DevOps engineer needs to download a Git repository from https://git.company.com/admin/project.git. Which of the following commands will achieve this goal?
- A. git branch https://git.company.com/admin/project.git
- B. git clone https://git.company.com/admin/project.git
- C. git pull https://git.company.com/admin/project.git
- D. git checkout https://git.company.com/admin/project.git
Answer: B
NEW QUESTION # 50
A Linux engineer receives reports that files created within a certain group are being modified by users who are not group members. The engineer wants to reconfigure the server so that only file owners and group members can modify new files by default. Which of the following commands would accomplish this task?
- A. chactr -Rv
- B. chmod 775
- C. chown -cf
- D. umask. 002
Answer: D
NEW QUESTION # 51
A Linux administrator is installing a web server and needs to check whether web traffic has already been allowed through the firewall. Which of the following commands should the administrator use to accomplish this task?
- A. firewalld --check-service http
- B. firewall-cmd --check-service http
- C. firewall-cmd --query-service http
- D. firewalld query-service-http
Answer: C
NEW QUESTION # 52
Which of the following commands will display the operating system?
- A. uname -n
- B. uname -m
- C. uname -s
- D. uname -o
Answer: D
NEW QUESTION # 53
A Linux user reported the following error after trying to connect to the system remotely:
ssh: connect to host 10.0.1.10 port 22: Resource temporarily unavailable The Linux systems administrator executed the following commands in the Linux system while trying to diagnose this issue:
Which of the following commands will resolve this issue?
- A. firewall-cmd --zone=public --permanent --add-port=22/udp
- B. firewall-cmd --zone=public --permanent --add-service=22
- C. systemctl enable firewalld; systemctl restart firewalld
- D. firewall-cmd --zone=public --permanent --add-service=ssh
Answer: D
NEW QUESTION # 54
A systems administrator configured firewall rules using firewalld. However, after the system is rebooted, the firewall rules are not present:
The systems administrator makes additional checks:
Which of the following is the reason the firewall rules are not active?
- A. The wrong system target is activated.
- B. iptables is conflicting with firewalld.
- C. FIREWALL_ARGS has no value assigned.
- D. The firewalld service is not enabled.
Answer: D
NEW QUESTION # 55
A junior administrator is setting up a new Linux server that is intended to be used as a router at a remote site. Which of the following parameters will accomplish this goal?
- A.

- B.

- C.

- D.

Answer: D
NEW QUESTION # 56
Several users reported that they were unable to write data to the /oracle1 directory. The following output has been provided:
Which of the following commands should the administrator use to diagnose the issue?
- A. fdisk -1 /dev/sdb1
- B. df -i /oracle1
- C. lsblk /dev/sdb1
- D. du -sh /oracle1
Answer: B
NEW QUESTION # 57
A Linux systems administrator needs to persistently enable IPv4 forwarding in one of the Linux systems. Which of the following commands can be used together to accomplish this task? (Choose two.)
- A. sysctl net.ipv4.ip_forward
- B. sysctl -p
- C. echo "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf
- D. echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
- E. echo 1 > /proc/sys/net/ipv4/ip_forward
- F. sysctl -w net.ipv4.ip_forward=1
Answer: D,F
NEW QUESTION # 58
A development team asks an engineer to guarantee the persistency of journal log files across system reboots. Which of the following commands would accomplish this task?
- A. grep -i auto /etc/systemd/journald.conf && systemctl restart systemd-journald.service
- B. journalctl --list-boots && systemctl restart systemd-journald.service
- C. cat /etc/systemd/journald.conf | awk '(print $1,$3)'
- D. sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/#//q' /etc/systemd/journald.conf
Answer: A
NEW QUESTION # 59
A developer is trying to install an application remotely that requires a graphical interface for installation. The developer requested assistance to set up the necessary environment variables along with X11 forwarding in SSH. Which of the following environment variables must be set in remote shell in order to launch the graphical interface?
- A. $DISPLAY
- B. $RHOST
- C. SETENV
- D. $SHELL
Answer: A
NEW QUESTION # 60
A systems administrator is tasked with preventing logins from accounts other than root, while the file /etc/nologin exists. Which of the following PAM modules will accomplish this task?
- A. pam_access.so
- B. pam_logindef.so
- C. pam_nologin.so
- D. pam_login.so
Answer: C
NEW QUESTION # 61
Joe, a user, is unable to log in to the Linux system. Given the following output:
Which of the following commands would resolve the issue?
- A. usermod -s /bin/bash joe
- B. chage -E 90 joe
- C. pam_tally2 -u joe -r
- D. passwd -u joe
Answer: A
NEW QUESTION # 62
An administrator is trying to diagnose a performance issue and is reviewing the following output:
System Properties:
CPU: 4 vCPU
Memory: 40GB
Disk maximum IOPS: 690
Disk maximum throughput: 44Mbps | 44000Kbps
Based on the above output, which of the following BEST describes the root cause?
- A. The system is mostly idle, therefore the iowait is high.
- B. The system has a partitioned disk, which causes the IOPS to be doubled.
- C. The system has reached its maximum IOPS, causing the system to be slow.
- D. The system has reached its maximum permitted throughput, therefore iowait is increasing.
Answer: D
NEW QUESTION # 63
A systems administrator has been unable to terminate a process. Which of the following should the administrator use to forcibly stop the process?
- A. kill -9
- B. kill -TERM
- C. kill -15
- D. kill -1
- E. kill -HUP
Answer: E
NEW QUESTION # 64
A Linux administrator needs to obtain a list of all volumes that are part of a volume group. Which of the following commands should the administrator use to accomplish this task?
- A. pvs
- B. fdisk -1
- C. vgs
- D. lvs
Answer: A
NEW QUESTION # 65
An administrator installed an application from source into /opt/operations1/ and has received numerous reports that users are not able to access the application without having to use the full path /opt/operations1/bin/*. Which of the following commands should be used to resolve this issue?
- A. echo 'export PATH=/opt/operations1/bin' >> /etc/profile
- B. echo 'export PATH=$PATH/opt/operations1/bin' >> /etc/profile
- C. echo 'export $PATH:/opt/operations1/bin' >> /etc/profile
- D. echo 'export PATH=$PATH:/opt/operations1/bin' >> /etc/profile
Answer: D
Explanation:
It would be better to put the directory before $PATH, so that way the directory is searched before the rest of the pathing options in $PATH.
NEW QUESTION # 66
A systems administrator installed a new software program on a Linux server. When the systems administrator tries to run the program, the following message appears on the screen.
Which of the following commands will allow the systems administrator to check whether the system supports virtualization?
- A. dmidecode -s system-version
- B. cat /sys/device/system/cpu/possible
- C. sysctl -a
- D. lscpu
Answer: D
NEW QUESTION # 67
A Linux administrator booted up the server and was presented with a non-GUI terminal. The administrator ran the command systemctl isolate graphical.target and rebooted the system by running systemctl reboot, which fixed the issue. However, the next day the administrator was presented again with a non-GUI terminal. Which of the following is the issue?
- A. The administrator did not set the default target to graphical.target.
- B. The administrator did not set the default target to basic.target.
- C. The administrator did not shut down the server properly.
- D. The administrator did not reboot the server properly.
Answer: A
NEW QUESTION # 68
As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following:
Add relevant content to /tmp/script.sh, so that it finds and compresses rotated files in /var/log without recursion.
INSTRUCTIONS
Fill the blanks to build a script that performs the actual compression of rotated log files.
If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.
Answer:
Explanation:
NEW QUESTION # 69
A systems administrator requires that all files that are created by the user named web have read-only permissions by the owner. Which of the following commands will satisfy this requirement?
- A. echo "umask 377" >> /home/web/.bashrc
- B. chmod -R 400 /home/web
- C. setfacl read /home/web
- D. chown web:web /home/web
Answer: B
NEW QUESTION # 70
......
Free XK0-005 Exam Dumps to Improve Exam Score: https://simplilearn.lead1pass.com/CompTIA/XK0-005-practice-exam-dumps.html