CompTIA XK0-005 Exam (page: 12)
CompTIA Linux+
Updated on: 25-Dec-2025

Viewing Page 12 of 61

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

Answer(s): B



A Linux administrator is creating a primary partition on the replacement hard drive for an application server. Which of the following commands should the administrator issue to verify the device name of this partition?

  1. sudo fdisk /dev/sda
  2. sudo fdisk -s /dev/sda
  3. sudo fdisk -l
  4. sudo fdisk -h

Answer(s): C



A systems administrator is investigating why one of the servers has stopped connecting to the internet.



Which of the following is causing the issue?

  1. The DNS address has been commented out in the configuration file.
  2. The search entry in the /etc/resolv.conf file is incorrect.
  3. Wired connection 1 is offline.
  4. No default route is defined.

Answer(s): A



A systems administrator is tasked with installing GRUB on the legacy MBR of the SATA hard drive. Which of the following commands will help the administrator accomplish this task?

  1. grub-install /dev/hda
  2. grub-install /dev/sda
  3. grub-install /dev/sr0
  4. grub-install /dev/hd0,0

Answer(s): B



A junior Linux administrator is tasked with installing an application. The installation guide states the application should only be installed in a run level 5 environment.



Which of the following commands would ensure the server is set to runlevel 5?

  1. systemctl isolate multi-user.target
  2. systemctl isolate graphical.target
  3. systemctl isolate network.target
  4. systemctl isolate basic.target

Answer(s): B



A Linux administrator is tasked with adding users to the system. However, the administrator wants to ensure the users' access will be disabled once the project is over. The expiration date should be 2021-09-30. Which of the following commands will accomplish this task?

  1. sudo useradd -e 2021-09-30 Project_user
  2. sudo useradd -c 2021-09-30 Project_user
  3. sudo modinfo -F 2021-09-30 Project_uses
  4. sudo useradd -m -d 2021-09-30 Project_user

Answer(s): A



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?

  1. git clone https://git.company.com/admin/project.git
  2. git checkout https://git.company.com/admin/project.git
  3. git pull https://git.company.com/admin/project.git
  4. git branch https://git.company.com/admin/project.git

Answer(s): A



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?

  1. echo 'export PATH=$PATH:/opt/operations1/bin' >> /etc/profile
  2. echo 'export PATH=/opt/operations1/bin' >> /etc/profile
  3. echo 'export PATH=$PATH/opt/operations1/bin' >> /etc/profile
  4. echo 'export $PATH:/opt/operations1/bin' >> /etc/profile

Answer(s): A



Viewing Page 12 of 61



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