top of page

CompTIA Linux+ Sample Questions for XK0-005 Exam Preparation

  • CertiMaan
  • Oct 26, 2025
  • 16 min read

Updated: Mar 3

Ace the CompTIA Linux+ XK0-005 exam with these updated and expert-curated sample questions tailored to match the latest exam format. These CompTIA Linux+ practice questions cover essential domains such as system management, security, scripting, automation, and troubleshooting—helping IT professionals prepare thoroughly for real-world Linux environments. Whether you're searching for free CompTIA Linux+ practice exams, XK0-005 dumps, or simulated mock tests, these sample questions are a valuable asset for exam readiness. Designed for system administrators and Linux enthusiasts aiming for certification, this collection helps reinforce core Linux concepts and boosts exam confidence. Begin your Linux+ journey with focused resources aligned to CompTIA’s certification goals.



CompTIA Linux+ Sample Questions List :


1. A cloud engineer needs to check the link status of a network interface named eth1 in a Linux server. Which of the following commands can help to achieve the goal?

  1. ifconfig hw eth1

  2. ss -ti eth1

  3. ip link show eth1

  4. netstat -r eth1

2. A Linux administrator modified the SSH configuration file. Which of the following commands should be used to apply the configuration changes?

  1. systemctl reload sshd

  2. systemctl mask sshd

  3. systemctl stop sshd

  4. systemctl start sshd

3. A senior Linux administrator has created several scripts that will be used to install common system applications. These scripts are published to a repository to share with the systems team. A junior Linux administrator needs to retrieve the scripts and make them available on a local workstation. Which of the following Git commands should the junior Linux administrator use to accomplish this task?

  1. fetch

  2. checkout

  3. clone

  4. branch

4. A Linux administrator wants to find out whether files from the wget package have been altered since they were installed. Which of the following commands will provide the correct information?

  1. rpm -F wget

  2. rpm -V wget

  3. rpm -qf wget

  4. rpm -i wget

5. A Linux administrator is configuring Apache on a system and needs to allow the service to start after every startup. Which of the following commands will allow the Linux administrator to accomplish this task while starting the service at the same time?

  1. systemctl start —-runtime boot httpd

  2. systemctl set-property restart httpd

  3. systemctl enable --now httpd

  4. systemctl mask --state=active httpd

6. An administrator needs to make some changes in the IaC declaration templates. Which of the following commands would maintain version control?

  1. git clone https://qithub.com/comptia/linux+-.git git fetch New-Branch

  2. git clone https://github.com/comptia/linux+-.git git status

  3. git clone https://github.com/comptia/linux+-.git git push origin

  4. git clone https://github.com/comptia/linuxt+-.git git checkout -b <new-branch>

7. A Linux administrator needs to expose port 9000 for a container to listen during runtime. The Linux administrator creates a Dockerfile with the following entries. # Test-Container FROM node:9-alpine - WORDDIR /usr/src/app - COPY package*.json ./ RUN npm install - copy . . EXPOSE 9000 - CMD ['npm", "start"] Which of the following commands should the administrator use to accomplish this task? (Choose two).

  1. docker push Test-Container

  2. docker tag Test-Container

  3. docker build -t Test-Container

  4. docker inspect Test-Container

  5. docker run -p 9000:80 Test-Container

  6. docker run -p 80:9000 Test-Container

8. A systems administrator is customizing a new Linux server. Which of the following settings for umask would ensure that new files have the default permissions: -rw-r-----?

  1. 0038

  2. 0027

  3. 0640

  4. 0017

9. Which of the following concepts describes the approach of keeping all configurations in a repository?

  1. Agentless deployment

  2. Infrastructure as code

  3. Orchestration

  4. Inventory

10. Which of the following best describes YAML?

  1. An open-source container orchestration engine

  2. A package used to start a cloud instance

  3. An open-source configuration management tool

  4. A data serialization language that is widely used in writing configuration files

11. A Linux administrator is removing non-permanent rules from the system firewall. Which of the following commands will allow the administrator to achieve this goal in the safest way possible?

  1. firewall-cmd –-runtime-to-permanent

  2. firewall-cmd –-complete-reload

  3. firewall-cmd –-set-default-zone

  4. firewall-cmd –-reload

12. A systems administrator needs to determine the largest file in a given directory. Which of the following commands should the administrator use?

  1. df /home/CFO

  2. ls /home/CFO

  3. du /home/CFO

  4. stat /home/CFO

13. A systems administrator checked out the code from the repository, created a new branch, made changes to the code, and then updated the main branch. The systems administrator wants to ensure that the Terraform state files do not appear in the main branch. Which of following should the administrator use to meet this requirement?

  1. .ssh

  2. .gitignore

  3. get

  4. Clone

14. A Linux administrator needs to schedule a system backup script /usr/local/bin/backup.sh to run every night at 1:30 a.m. Which of the following entries should the administrator add to system crontab to achieve the goal?

  1. 30 1 * /usr/local/bin/backup.sh

  2. * 1 30 /usr/local/bin/backup.sh

  3. 1:30 * /usr/local/bin/backup.sh

  4. 1 30 * /usr/local/bin/backup.sh

15. A systems administrator wants to test the route between IP address 10.0.2.15 and IP address 192.168.1.40. Which of the following commands will accomplish this task?

  1. ip route get 192.163.1.40 from 10.0.2.15

  2. route -n 192.168.1.40 from 10.0.2.15

  3. route -e get to 192.168.1.40 from 10.0.2.15

  4. ip route 192.169.1.40 to 10.0.2.15

16. A Linux system is failing to start due to issues with several critical system processes. Which of the following options can be used to boot the system into the single user mode? (Choose two.)

  1. Interrupt the boot process in the GRUB menu and add systemd.unit=single in the kernel line

  2. Execute the following command from the GRUB rescue shell: mount -o remount, ro/sysroot

  3. Interrupt the boot process in the GRUB menu and add systemd.unit=rescue.target in the kernel line

  4. Interrupt the boot process in the GRUB menu and add systemd.unit=single.target in the kernel line

  5. Interrupt the boot process in the GRUB menu and add init=/bin/bash in the kernel line

  6. Interrupt the boot process in the GRUB menu and add single=user in the kernel line

17. In order to copy data from another VLAN, a systems administrator wants to temporarily assign IP address 10.0.6.5/24 to the newly added network interface enpls0f1. Which of the following commands should the administrator run to achieve the goal?

  1. ifconfig 10.0.6.5/24 enpsls0f1

  2. echo "IPV4_ADDRESS=10.0.6.5/24" > /etc/sysconfig/network-scripts/ifcfg-enpls0f1

  3. ip addr add 10.0.6.5/24 dev enpls0f1

  4. nmcli conn add ipv4.address=10.0.6.5/24 if name snpls0f1

18. A cloud engineer needs to block the IP address 192.168.10.50 from accessing a Linux server. Which of the following commands will achieve this goal?

  1. iptables -A INPUT -s 192.168.10.30 -j DROP

  2. iptables -F INPUT -j 192.168.10.50 -m DROP

  3. iptables -j INPUT 192.168.10.50 -p DROP

  4. iptables -i INPUT --ipv4 192.168.10.50 -z DROP

19. Using AD Query, the security gateway connections to the Active Directory Domain Controllers using what protocol?

  1. Hypertext Transfer Protocol Secure (HTTPS)

  2. Windows Management Instrumentation (WMI)

  3. Remote Desktop Protocol (RDP)

  4. Lightweight Directory Access Protocol (LDAP)

20. Developers have requested implementation of a persistent, static route on the application server. Packets sent over the interface eth0 to 10.0.213.5/32 should be routed via 10.0.5.1. Which of the following commands should the administrator run to achieve this goal?

  1. echo "10.0.213.5 10.0.5.1 eth0" > /proc/net/route

  2. ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0

  3. route modify eth0 +ipv4.routes "10.0.213.5/32 10.0.5.1"

  4. route -i etho -p add 10.0.213.5 10.0.5.1

21. A systems administrator is building a database container. The container should perform different tasks based on the parameters that are provided during startup (for example, init, start, recover). The administrator wrote a startScript.sh script to achieve this objective. Which of the following Dockerfile statements would run the startScript.sh using the provided parameters?

22. A Linux administrator is troubleshooting an issue in which users are not able to access https://portal.comptia.org from a specific workstation. The administrator runs a few commands and receives the following output: # cat /etc/hosts 10.10.10.55 portal.comptia.org # host portal.comptia.org portal.comptia.org has address 192.168.1.55 #cat /etc/resolv.conf nameserver 10.10.10.5 Which of the following tasks should the administrator perform to resolve this issue?

  1. Add a network route from the 10.10.10.0/24 to the 192.168.0.0/16.

  2. Remove the entry for portal.comptia.org from the local hosts file

  3. Clear the local DNS cache on the workstation and rerun the host command

  4. Update the name server in resolv.conf to use an external DNS server

23. A Linux administrator is configuring network traffic forwarding. Despite having proper iptables rules, the traffic forwarding is not working. Which of the following commands will allow Linux to pass network traffic between different interfaces?

  1. ip route forward allow --all-interfaces ; systemctl restart network

  2. modprobe ip_forward

  3. echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf ; sysctl -p

  4. nmcli allow-forwarding eth0

24. An administrator started a long-running process in the foreground that needs to continue without interruption. Which of the following keystrokes should the administrator use to continue running the process in the background?

  1. bg

  2. jobs -1 

  3. bg

  4. bg &

25. A systems administrator is analyzing the data usage on a Linux system. Which of the following commands will display a list of the entire /var contents along with sizes?

  1. lsblk /var

  2. du –ah /var/

  3. ls –ltr /var | sort –n

  4. df –h


    CompTIA Linux+ XK0-005  Practice Questions for Certification

26. A systems administrator needs to integrate a new storage array into the company's existing storage pool. The administrator wants to ensure that the server is able to detect the new storage array. Which of the following commands should the administrator use to ensure that the new storage array is presented to the systems?

  1. lshw

  2. lsscsi

  3. lsusb

  4. lsipc

27. Which of the following tools is commonly used for creating CI/CD pipelines?

  1. Jenkins

  2. Puppet

  3. Chef

  4. Ansible

28. A Linux administrator is configuring crontab and needs to schedule a task to run only on Saturday and Sunday of every week of the year at 9:00 a.m. Which of the following should the administrator use to accomplish this task?

  1. 0 9 1-5 root /root/script.sh

  2. 0 9 6,0 root /root/script.sh

  3. 0 9 1 root /root/script.sh

  4. 0 9 1 /3 root /root/script.sh

29. A new application container was built with an incorrect version number. Which of the following commands should be used to rename the image to match the correct version 2.1.2?

  1. docker push comptia/app:2.1.1 comptia/app:2.1.2

  2. docker rmi comptia/app:2.1.1 comptia/app:2.1.2

  3. docker update comptia/app:2.1.1 comptia/app:2.1.2

  4. docker tag comptia/app:2.1.1 comptia/app:2.1.2

30. A systems administrator wants to ensure all the latest patches and updates are automatically synced to the local repository every two hours on Sundays through Tuesdays in the month of May. Which of the following cron entries can the administrator use to achieve this goal? (Choose two.)

  1. 0 /2 5 0-2 /root/update-from-remote-to-local.sh

  2. 0 /2 5 0-3 /root/update-from-remote-to-local.sh

  3. 0 0,2,4,6,8,10,12,14 * 5 0-3 /root/update-from-remote-to-local.sh

  4. 0 0-23/2 * 5 0-3 /root/update-from-remote-to-local.sh

  5. 0 0-23/2 * 5 0-2 /root/update-from-remote-to-local.sh

  6. 0 0,2,4,6,8,10,12,14 * 5 0-2 /root/update-from-remote-to-local.sh

31. A Linux administrator edits a file that a system uses during the startup process to mount all the required partitions and volumes. The administrator wants to ensure no errors are in the file and the system will restart properly. Which of the following commands should the administrator use?

  1. fsck –N

  2. fsadm –v

  3. mountpoint –d

  4. mount –a

32. A newly created container has been unable to start properly, and a Linux administrator is analyzing the cause of the failure. Which of the following will allow the administrator to determine the FIRST command that is executed inside the container right after it starts?

  1. docker info <container_id>

  2. docker inspect <container_id>

  3. docker export <container_id>

  4. docker start <container_id>

33. A Linux administrator is configuring a new internal web server fleet. The web servers are up and running but can only be reached by users directly via IP address. The administrator is attempting to fix this inconvenience by requesting appropriate records from the DNS team. The details are: Hostname: devel.comptia.org - IP address: 5.5.5.1, 5.5.5.2, 5.5.5.3, 5.5.5.4 Name server: 5.5.5.254 - Additional names: dev.comptia.org, development.comptia.org Which of the following types of DNS records should the Linux administrator request from the DNS team? (Choose three).

  1. CNAME

  2. PTR

  3. NS

  4. MX

  5. A

34. A systems administrator wants to upgrade /bin/someapp to a new version, but the administrator does not know the package name. Which of the following will show the RPM package name that provides that binary file?

  1. rpm -i /bin/someapp

  2. rpm -p /bin/someapp

  3. rpm -Vv /bin/someapp

  4. rpm -qf /bin/someapp

35. A Linux administrator is adding a new configuration file to a Git repository. Which of the following describes the correct order of Git commands to accomplish the task successfully?

  1. pull -> push -> add -> checkout

  2. pull -> add -> commit -> push

  3. checkout -> push -> add -> pull

  4. pull -> add -> push -> commit

36. A systems administrator is compiling a report containing information about processes that are listening on the network ports of a Linux server. Which of the following commands will allow the administrator to obtain the needed information?

  1. lsof -lt

  2. netstat -pn

  3. tcpdump -nL

  4. ss -plnt

37. A developer needs to launch an Nginx image container, name it Web00l, and expose port 8080 externally while mapping to port 80 inside the container. Which of the following commands will accomplish this task?

  1. docker pull -it -p 8080:80 --name Web001 nginx

  2. docker run -it -p 8080:80 --name Web001 nginx

  3. docker load -it -p 8080:80 --name Web001 nginx

  4. docker exec -it -p 8080:80 --name Web001 nginx

38. A systems administrator is notified that the mysqld process stopped unexpectedly. The systems administrator issues the following command: sudo grep –i -r ‘out of memory’ /var/log The output of the command shows the following: kernel: Out of memory: Kill process 9112 (mysqld) score 511 or sacrifice child. Which of the following commands should the systems administrator execute NEXT to troubleshoot this issue? (Select two).

  1. killall -15

  2. free -h

  3. nc -v 127.0.0.1 3306

  4. lsblk

  5. vmstat -a 1 4

  6. renice -15 $( pidof mysql )

39. An administrator runs ping comptia. org. The result of the command is: ping: comptia.org: Name or service not known Which of the following files should the administrator verify?

  1. /etc/services

  2. /etc/resolv.conf

  3. /etc/ethers

  4. /etc/sysctl.conf

40. After connecting to a remote host via SSH, an administrator attempts to run an application but receives the following error: [user@worksration ~]$ ssh admin@srv1 Last login: Tue Mar 29 18:03:34 2022 [admin@srv1 ~] $ /usr/local/bin/config_manager Error: cannot open display: [admin@srv1 ~] $ Which of the following should the administrator do to resolve this error?

  1. Enable X11 forwarding in /etc/ssh/ssh_config and restart the server

  2. Add Options X11 to the /home/admin/ .ssh/authorized_keys file

  3. Disconnect from the SSH session and reconnect using the ssh -x command

  4. Open port 6000 on the workstation and restart the firewalld service

41. What is the main objective when using Application Control?

  1. To assist the firewall blade with handling traffic

  2. To filter out specific content

  3. To see what users are doing

  4. Ensure security and privacy of information

42. An administrator has source code and needs to rebuild a kernel module. Which of the following command sequences is most commonly used to rebuild this type of module?

  1. ./configure make make install

  2. build install configure

  3. wget gcc cp

  4. tar xvzf build cp

43. Joe, a user, is unable to log in to the system. The Linux administrator checks the /etc/passwd file and reviews the following output: Joe:x:1002:1002::/home/Joe:/sbin/nologin Which of the following should the administrator do to fix this issue?

  1. Ensure that a corresponding entry is in the /etc/shadow file for Joe

  2. Issue the usermod -L Joe command

  3. Remove the x entry in the /etc/passwd file for Joe

  4. Change the /sbin/nologin entry to /bin/sh for Joe

44. A systems administrator creates a public key for authentication. Which of the following tools is MOST suitable to use when uploading the key to the remote servers?

  1. ssh-copy-id

  2. ssh-keyscan

  3. scp

  4. ssh-agent

45. The systemd logs are disappearing after a restart, even though the free disk space is adequate. Which of the following is the cause of this behavior?

  1. The directory /tmp does not have enough free space

  2. The journald size limit has been exceeded

  3. The option Storage=volatile is set in the journald configuration

  4. The service systemd-journald is disabled and masked

46. A security technician receives a report of a suspected phishing email with an attachment named payroll.csv. The technician downloads and saves the attachment but wants to verify the attachment type before opening it. Which of the following commands should the technician use to verify the attachment type?

  1. tree payroll.csv

  2. file payroll.csv

  3. df payroll.csv

  4. cat payroll.csv

47. A Linux systems administrator wants to validate the network interfaces configuration and status on a Linux server. Which of the following commands should the administrator use to display the information for interface eth3 including status, IP address, subnet mask, and configuration?

  1. ip list interface eth3

  2. ip show eth3

  3. ip addr show dev eth3

  4. ip config eth3

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

  1. sysctl net.ipv4.ip_forward

  2. sysctl -w net.ipv4.ip_forward=1

  3. sysctl –p

  4. echo 1 > /proc/sys/net/ipv4/ip_forward

  5. echo "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf

  6. echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf

49. A Linux system is failing to boot. The following error is displayed in the serial console: [[1;33mDEPEND[Om] Dependency failed for /data. [[1;33mDEPEND[Om] Dependency failed for Local File Systems ... Welcome to emergency mode! After logging in, type "journalctl -xb" to viewsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode. Give root password for maintenance (or type Control-D to continue} Which of the following files will need to be modified for this server to be able to boot again?

  1. /ete/grub.conf

  2. /dev/sda

  3. /etc/mtab

  4. /etc/fstab

50. An administrator wants to reorganize the /etc/sudoers configuration file by department groups. Which of the following actions should the administrator take?

  1. Execute setfacl commands on /etc/sudoers and add rw permissions for each group

  2. Create a symlink in each user's home directory to /etc/sudoers

  3. Configure includedir /etc/sudoers.d directive inside /etc/sudoers file

  4. Copy /etc/sudoers and name each group with incremental numbers (/etc/sudoersl, /etc/sudoers2)

51. A systems administrator needs to create a new service unit file. This new unit file is required to start when all services are running with the command-line interface only. Which of the following options should the administrator use to accomplish this task?

  1. WantedBy=network-online.target

  2. WantedBy=basic.target

  3. WantedBy=multi-user.target

  4. WantedBy=graphical.target

52. A technician just fixed a few issues in some code and is ready to deploy the code into production. Which of the following steps should the technician take next?

  1. Create a git pull request to merge into main

  2. Perform a git clone to pull main down

  3. Perform a git pull to update the local copy of the code

  4. Create a new branch using git checkout

53. A Linux administrator needs to rebuild a container with httpd service in order to change some default parameters. Which of the following should be the first command line in the Dockerfile?

  1. INHERIT httpd

  2. FROM httpd

  3. USE httpd

  4. BASE httpd

54. A diagnostic tool reports a “host seems down” event for a server with an IP address of 192.168.47.44. Which of the following commands should the administrator use to confirm the host down event?

  1. ping -c 1 192.168.47.44

  2. nmap 192.168.47.0/32

  3. nmap 192.168.47.44 -Pn

  4. netcat 192.168.47.44

55. A Linux administrator found many containers in an exited state. Which of the following commands will allow the administrator to clean up the containers in an exited state?

  1. docker rm $(docker ps -aq)

  2. docker rm --state exited

  3. docker rm --all

  4. docker images prune *


    CompTIA Linux+ XK0-005 Sample Questions

56. A Linux engineer needs to get information from the foo.com domain mail servers. Which of the following network tools should the engineer use?

  1. nc mx foo.com

  2. dig mx foo.com

  3. route mx foo.com

  4. arp mx foo.com

57. Which of the following options represents disk mirroring?

  1. RAID 0

  2. RAID 6

  3. RAID 1

  4. RAID 5

58. A user generated a pair of private-public keys on a workstation. Which of the following commands will allow the user to upload the public key to a remote server and enable passwordless login?

  1. scp ~/.ssh/id_rsa user@server:~/

  2. ssh-add user server

  3. rsync ~ /.ssh/ user@server:~/

  4. ssh-copy-id user@server

59. A diagnostic tool reports a "host seems down" event for a server with an IP address of 192.168.47.44. Which of the following commands would the administrator use to best confirm the host down event with the least chance of false positives?

  1. nmap 192.168.47.0/32

  2. netcat 192.168.47.44

  3. nmap 192.168.47.44 -Pn

  4. ping -с 1 192.168.47.44

60. 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?

  1. vgs

  2. fdisk -1

  3. pvs

  4. lvs

61. Which of the following best explains why the SUID permission is set on the /bin/passwd file?

  1. To allow normal users to update the /etc/shadow file

  2. To indicate an attacker has compromised the system

  3. To mark the /bin/passwd file as immutable

  4. To ensure group permission on the /etc/passwd file stay up to date

62. A Linux engineer is removing a previously created firewall rule. Which of the following commands will help the administrator accomplish this task?

  1. ufw delete deny 80/tcp

  2. ufw delete 80/tcp deny

  3. ufw delete 80/tcp

  4. ufw 80/tcp delete

63. A systems administrator created a new directory with specific permissions. Given the following output: # file: comptia # owner: root * group: root user::rwx group::r-x other::--- default:user::rwx default:group::r-x default:group:wheel:rwx default:mask::rwx default:other::--- Which of the following permissions are enforced on /comptia?

  1. Members of the wheel group can read files in /comptia

  2. Other users can create files in /comptia

  3. Only root can create flies in /comptia

  4. Newly created files in /comptia will have the sticky bit set

64. A Linux systems administrator needs to compress a file named passwords.txt. The compressed file should be saved as passwords.txt.gz. Which of the following commands should the administrator use to accomplish this task?

  1. gzip -с passwords.txt > passwords.txt.gz

  2. gzip -n passwords.txt << passwords.txt.gz

  3. gzip -n passwords.txt < passwords.txt.gz

  4. gzip -d passwords.txt | passwords.txt.gz

65. A Linux administrator is providing a new Nginx image from the registry to local cache. Which of the following commands would allow this to happen?

  1. docker import nginx

  2. docker commit nginx

  3. docker attach nginx

  4. docker pull nginx

66. Which of the following technologies provides load balancing, encryption, and observability in containerized environments?

  1. Overlay network

  2. Sidecar pod

  3. Service mesh

  4. Virtual private network

67. A DevOps engineer wants to work on a snapshot of the infrastructure as code configuration. Which of the following commands should the engineer use to accomplish this task?

  1. git push

  2. git pull

  3. git tag

  4. git branch

68. A systems technician is configuring an application server to accept packets from a trusted source with the IP address 192.168.10.22. Which of the following commands will allow communication between the two servers?

  1. iptables -A INPUT -s 192.168.10.22 -j ACCEPT

  2. iptables -A OUTPUT -s 192.168.10.22 -j ACCEPT

  3. iptables -L -s 192.168.10.22 -j ACCEPT

  4. iptables -D INPUT -s 192.168.10.22 -j ACCEPT

69. A systems administrator is encountering performance issues. The administrator runs a command with the following output: 09:10:18 up 457 days, 32min, 5 users, load average: 4.22 6.63 5.58 The Linux server has the following system properties: CPU 4 vCPU - Memory: 50GB - Which of the following accurately describes this situation?

  1. Too many users are currently logged in to the system

  2. The system has been running for over a year and requires a reboot

  3. The system requires more memory

  4. The system is under CPU pressure and will require additional vCPUs

70. Before a Linux administrator restarts a system using systemd, the administrator wants to know if any of the server users are currently logged in. Which of the following commands should the administrator use to verify that the server is not being used?

  1. loginctl list-sessions

  2. journalctl -u

  3. systemd --user

  4. systemctl status user-sessions

71. After system startup, the X Window System GUI login interface is not displaying. Which of the following commands ensures that the GUI is started during the system startup process?

  1. systemctl set-default graphical.target

  2. systemctl unmask xwindow.service

  3. systemctl isolate graphical.target

  4. systemctl enable xwindow.service

72. A Linux administrator needs to create an image named sda.img from the sda disk and store it in the /tmp directory. Which of the following commands should be used to accomplish this task?

  1. dd --of=/dev/sda --if=/tmp/sda.img

  2. dd if=/dev/sda of=/tmp/sda.img

  3. dd --if=/dev/sda --of=/tmp/sda.img

  4. dd of=/dev/sda if=/tmp/sda.img

73. A Linux administrator tries to install Ansible in a Linux environment. One of the steps is to change the owner and the group of the directory /opt/Ansible and its contents. Which of the following commands will accomplish this task?

  1. groupmod -g Ansible -n /opt/Ansible

  2. chown -R Ansible:Ansible /opt/Ansible

  3. usermod -aG Ansible /opt/Ansible

  4. chmod -c /opt/Ansible

74. A user created the following script file: #!/bin/bash # FILENAME: /home/user/script.sh echo "hello world" exit 1 However, when the user tried to run the script file using the command ~/script.sh, an error returned indicating permission was denied. Which of the following should the user execute in order for the script to run properly?

  1. chmod o+r /home/user/script.sh

  2. chmod u+x /home/user/script.sh

  3. chmod 600 /home/user/script.sh

  4. chmod 007 /home/user/script.sh

75. A Linux administrator needs to check extended permissions applied to the directory test. Which of the following commands should the administrator use to help with this task?

  1. getenforce test/

  2. getfacl test/

  3. getsebool test/

  4. ls -al test/


    CompTIA Linux+ XK0-005 Dumps

76. Which of the following Git commands would send committed changes to a remote repository?

  1. git push origin master

  2. git commit -a

  3. git stash

  4. git add .


FAQs


1. What is the CompTIA Linux+ XK0-005 certification exam?

It is a globally recognized certification that validates the skills needed to administer, configure, and troubleshoot Linux systems across various environments.

2. How do I become CompTIA Linux+ XK0-005 certified?

You must register for and pass the XK0-005 exam, which tests your practical and technical Linux knowledge.

3. What are the prerequisites for the CompTIA Linux+ XK0-005 exam?

There are no official prerequisites, but CompTIA recommends CompTIA A+ and Network+ certifications or equivalent Linux experience.

4. How much does the CompTIA Linux+ XK0-005 certification cost?

The exam costs $358 USD, though prices may vary by location.

5. How many questions are in the CompTIA Linux+ XK0-005 exam?

The exam includes 90 questions, a mix of multiple-choice and performance-based tasks.

6. What topics are covered in the CompTIA Linux+ XK0-005 exam?

It covers system management, security, scripting, automation, networking, and troubleshooting.

7. How difficult is the CompTIA Linux+ XK0-005 certification exam?

It’s considered moderately challenging and requires hands-on Linux experience and command-line proficiency.

8. How long does it take to prepare for the CompTIA Linux+ XK0-005 exam?

Most candidates prepare for 8–12 weeks, depending on experience and study schedule.

9. What jobs can I get after earning the CompTIA Linux+ XK0-005 certification?

You can work as a Linux Administrator, Systems Engineer, IT Support Specialist, or Network Administrator.

10. How much salary can I earn with a CompTIA Linux+ XK0-005 certification?

Professionals with this certification typically earn between $75,000–$100,000 annually, depending on experience and role.


Recent Posts

See All
CertiMaan Logo

​​

Terms Of Use     |      Privacy Policy     |      Refund Policy    

   

 Copyright © 2011 - 2026  Ira Solutions -   All Rights Reserved

Disclaimer:: 

The content provided on this website is for educational and informational purposes only. We do not claim any affiliation with official certification bodies, including but not limited to Pega, Microsoft, AWS, IBM, SAP , Oracle , PMI, or others.

All practice questions, study materials, and dumps are intended to help learners understand exam patterns and enhance their preparation. We do not guarantee certification results and discourage the misuse of these resources for unethical purposes.

PayU logo
Razorpay logo
bottom of page