CompTIA XK0-005 Exam (page: 1)
CompTIA Linux+
Updated on: 11-Aug-2025

Viewing Page 1 of 90

An administrator accidentally deleted the /boot/vmlinuz file and must resolve the issue before the server is rebooted.
Which of the following commands should the administrator use to identify the correct version of this file?

  1. rpm -qa | grep kernel; uname -a
  2. yum -y update; shutdown -r now
  3. cat /etc/centos-release; rpm -Uvh --nodeps
  4. telinit 1; restorecon -Rv /boot

Answer(s): A



A cloud engineer needs to change the secure remote login port from 22 to 49000.
Which of the following files should the engineer modify to change the port number to the desired value?

  1. /etc/host.conf
  2. /etc/hostname
  3. /etc/services
  4. /etc/ssh/sshd_config

Answer(s): D



A new file was added to a main Git repository. An administrator wants to synchronize a local copy with the contents of the main repository.
Which of the following commands should the administrator use for this task?

  1. git reflog
  2. git pull
  3. git status
  4. git push

Answer(s): B



A Linux administrator needs to redirect all HTTP traffic temporarily to the new proxy server 192.0.2.25 on port 3128.
Which of the following commands will accomplish this task?

  1. iptables -t nat -D PREROUTING -p tcp --sport 80 -j DNAT - -to-destination 192.0.2.25:3128
  2. iptables -t nat -A PREROUTING -p top --dport 81 -j DNAT –-to-destination 192.0.2.25:3129
  3. iptables -t nat -I PREROUTING -p top --sport 80 -j DNAT –-to-destination 192.0.2.25:3129
  4. iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT –-to-destination 192.0.2.25:3128

Answer(s): D



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. route -i etho -p add 10.0.213.5 10.0.5.1
  2. route modify eth0 +ipv4.routes "10.0.213.5/32 10.0.5.1"
  3. echo "10.0.213.5 10.0.5.1 eth0" > /proc/net/route
  4. ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0

Answer(s): D



Viewing Page 1 of 90



Share your comments for CompTIA XK0-005 exam with other users:

soheib 7/24/2023 7:05:00 PM

question: 78 the right answer i think is d not a
Anonymous