comptia xk0-005 practice test

CompTIA Linux+

Last exam update: Feb 21 ,2024
Page 1 out of 19. Viewing questions 1-10 out of 187

Question 1

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. lscpu
  • C. sysctl -a
  • D. cat /sys/device/system/cpu/possible
Answer:

b

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 2

A systems administrator made some changes in the ~/.bashrc file and added an alias command. When the administrator tried to use the alias command, it did not work. Which of the following should be executed FIRST?

  • A. source ~/.bashrc
  • B. read ~/.bashrc
  • C. touch ~/.bashrc
  • D. echo ~/.bashrc
Answer:

a

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 3

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/fstab 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. Sync the mount units.
  • B. Mount the filesystem manually.
  • C. Create a mount unit and enable it to be started at boot.
  • D. Remount all the missing filesystems.
Answer:

c

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 4

A Linux administrator has physically added a new RAID adapter to a system. Which of the following commands should the Linux administrator run to confirm that the device has been recognized? (Choose two.)

  • A. rmmod
  • B. ls -ll /etc
  • C. lshw -class disk
  • D. pvdisplay
  • E. rmdir /dev
  • F. dmesg
Answer:

cf

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
F
50%
Discussions
vote your answer:
A
B
C
D
E
F
0 / 1000

Question 5

A systems administrator pressed Ctrl+Z after starting a program using the command line, and the shell prompt was presented. In order to go back to the program, which of the following commands can the administrator use?

  • A. fg
  • B. su
  • C. bg
  • D. ed
Answer:

a

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 6

A cloud engineer needs to remove all dangling images and delete all the images that do not have an associated container. Which of the following commands will help to accomplish this task?

  • A. docker images prune -a
  • B. docker push images -a
  • C. docker rmi -a images
  • D. docker images rmi --all
Answer:

a

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 7

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?

  • A. rpm -qf /bin/someapp
  • B. rpm -Vv /bin/someapp
  • C. rpm -p /bin/someapp
  • D. rpm -i /bin/someapp
Answer:

a

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 8

A cloud engineer is installing packages during VM provisioning. Which of the following should the engineer use to accomplish this task?

  • A. Cloud-init
  • B. Bash
  • C. Docker
  • D. Sidecar
Answer:

a

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 9

A Linux administrator needs to analyze a failing application that is running inside a container. Which of the following commands allows the Linux administrator to enter the running container and analyze the logs that are stored inside?

  • A. docker run -ti app /bin/sh
  • B. podman exec -ti app /bin/sh
  • C. podman run -d app /bin/bash
  • D. docker exec -d app /bin/bash
Answer:

b

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 10

After installing a new version of a package, a systems administrator notices a new version of the corresponding .service file was installed. In order to use the new version of the .service file, which of the following commands must be issued FIRST?

  • A. systemctl status
  • B. systemctl stop
  • C. systemctl reinstall
  • D. systemctl daemon-reload
Answer:

d

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000
To page 2