CompTIA XK0-005 Practice Exams
Last updated on Apr 07,2025- Exam Code: XK0-005
- Exam Name: CompTIA Linux+ Exam
- Certification Provider: CompTIA
- Latest update: Apr 07,2025
A Linux administrator was notified that a virtual server has an I/O bottleneck.
The Linux administrator analyzes the following output:
Given there is a single CPU in the sever, which of the following is causing the slowness?
- A . The system is running out of swap space.
- B . The CPU is overloaded.
- C . The memory is exhausted.
- D . The processes are paging.
A Linux administrator needs to create a new cloud.cpio archive containing all the files from the current directory.
Which of the following commands can help to accomplish this task?
- A . ls | cpio -iv > cloud.epio
- B . ls | cpio -iv < cloud.epio
- C . ls | cpio -ov > cloud.cpio
- D . ls cpio -ov < cloud.cpio
Due to performance issues on a server, a Linux administrator needs to termi-nate an unresponsive process.
Which of the following commands should the administrator use to terminate the process immediately without waiting for a graceful shutdown?
- A . kill -SIGKILL 5545
- B . kill -SIGTERM 5545
- C . kill -SIGHUP 5545
- D . kill -SIGINT 5545
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 -w net.ipv4.ip_forward=1
- C . echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
- D . echo 1 > /proc/sys/net/ipv4/ip_forward
- E . sysctl Cp
- F . echo "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf
A Linux administrator created a new file system.
Which of the following files must be updated to ensure the filesystem mounts at boot time?
- A . /etc/sysctl
- B . /etc/filesystems
- C . /etc/fstab
- D . /etc/nfsmount.conf
A systems administrator created a new Docker image called test. After building the image, the administrator forgot to version the release.
Which of the following will allow the administrator to assign the v1 version to the image?
- A . docker image save test test:v1
- B . docker image build test:vl
- C . docker image tag test test:vl
- D . docker image version test:v1
A systems administrator detected corruption in the /data filesystem.
Given the following output:
Which of the following commands can the administrator use to best address this issue?
- A . umount /data
mkfs . xfs /dev/sclcl
mount /data - B . umount /data
xfs repair /dev/ sdcl
mount /data - C . umount /data
fsck /dev/ sdcl
mount / data - D . umount /data
pvs /dev/sdcl
mount /data
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 . pam_tally2 -u joe -r
- C . passwd -u joe
- D . chage -E 90 joe
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 account was locked out due to three failed logins.
- C . The user entered the wrong password.
- D . The user has the wrong shell assigned to the account.
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 . Add the line DenyUsers root to the /etc/hosts.deny file.
- B . Set PermitRootLogin to no in the /etc/ssh/sshd_config file.
- C . Add the line account required pam_nologin. so to the /etc/pam.d/sshd file.
- D . Set PubKeyAuthentication to no in the /etc/ssh/ssh_config file.