ExamGecko
Home Home / CompTIA / XK0-005

CompTIA XK0-005 Practice Test - Questions Answers, Page 14

Question list
Search
Search

List of questions

Search

Related questions











A Linux administrator needs to expand a volume group using a new disk. Which of the following options presents the correct sequence of commands to accomplish the task?

A.
partprobevgcreatelvextend
A.
partprobevgcreatelvextend
Answers
B.
lvcreatefdiskpartprobe
B.
lvcreatefdiskpartprobe
Answers
C.
fdiskpartprobemkfs
C.
fdiskpartprobemkfs
Answers
D.
fdiskpvcreatevgextend
D.
fdiskpvcreatevgextend
Answers
Suggested answer: D

Explanation:

The correct sequence of commands to expand a volume group using a new disk is fdisk, pvcreate, vgextend. The fdisk command can be used to create a partition on the new disk with the type 8e (Linux LVM). The pvcreate command can be used to initialize the partition as a physical volume for LVM. The vgextend command can be used to add the physical volume to an existing volume group.

The partprobe command can be used to inform the kernel about partition table changes, but it is not necessary in this case. The vgcreate command can be used to create a new volume group, not expand an existing one. The lvextend command can be used to extend a logical volume, not a volume group. The lvcreate command can be used to create a new logical volume, not expand a volume group. The mkfs command can be used to create a filesystem on a partition or a logical volume, not expand a volume group. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 14:

Managing Disk Storage, pages 462-463.

Which of the following directories is the mount point in a UEFI system?

A.
/sys/efi
A.
/sys/efi
Answers
B.
/boot/efi
B.
/boot/efi
Answers
C.
/efi
C.
/efi
Answers
D.
/etc/efi
D.
/etc/efi
Answers
Suggested answer: B

Explanation:

The /boot/efi directory is the mount point in a UEFI system. This directory contains the EFI System Partition (ESP), which stores boot loaders and other files required by UEFI firmware. The /sys/efi directory does not exist by default in Linux systems. The /efi directory does not exist by default in Linux systems. The /etc/efi directory does not exist by default in Linux systems. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 11: Managing the Linux Boot Process, page 398.

A Linux administrator copied a Git repository locally, created a feature branch, and committed some changes to the feature branch. Which of the following Git actions should the Linux administrator use to publish the changes to the main branch of the remote repository?

A.
rebase
A.
rebase
Answers
B.
tag
B.
tag
Answers
C.
commit
C.
commit
Answers
D.
push
D.
push
Answers
Suggested answer: D

Explanation:

The push action is used to publish the changes made in a local branch to a remote branch of a Git repository. This action will update the remote branch with the commits made in the local branch and synchronize the two branches. The rebase action is used to reapply commits from one branch onto another branch, creating a linear history of commits. This action does not publish any changes to a remote repository. The tag action is used to create an annotated reference to a specific commit in a Git repository. This action does not publish any changes to a remote repository. The commit action is used to record changes made in the local repository and create a new snapshot of the project state.

This action does not publish any changes to a remote repository. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 20: Writing and Executing Bash Shell Scripts, page 579.

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?

A.
vgs
A.
vgs
Answers
B.
lvs
B.
lvs
Answers
C.
fdisk -1
C.
fdisk -1
Answers
D.
pvs
D.
pvs
Answers
Suggested answer: B

Explanation:

The lvs command can be used to obtain a list of all volumes that are part of a volume group. This command will display information such as the name, size, attributes, and volume group of each logical volume in the system. The vgs command can be used to obtain a list of all volume groups in the system, not the volumes. The fdisk -1 command is invalid, as -1 is not a valid option for fdisk. The pvs command can be used to obtain a list of all physical volumes in the system, not the volumes. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 14: Managing Disk Storage, page 461.

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?

A.
pull -> push -> add -> checkout
A.
pull -> push -> add -> checkout
Answers
B.
pull -> add -> commit -> push
B.
pull -> add -> commit -> push
Answers
C.
checkout -> push -> add -> pull
C.
checkout -> push -> add -> pull
Answers
D.
pull -> add -> push -> commit
D.
pull -> add -> push -> commit
Answers
Suggested answer: B

Explanation:

The correct order of Git commands to add a new configuration file to a Git repository is pull -> add -> commit -> push. The pull command will fetch and merge the changes from the remote repository to the local repository, ensuring that the local repository is up to date. The add command will stage the new configuration file for the next commit, marking it as a new file to be tracked by Git. The commit command will create a new snapshot of the project state with the new configuration file and a descriptive message. The push command will publish the commit to the remote repository, updating the remote branch with the new configuration file. The pull -> push -> add -> checkout order is incorrect, as it will not create a commit for the new configuration file, and it will switch to a different branch without pushing the changes. The checkout -> push -> add -> pull order is incorrect, as it will switch to a different branch before adding the new configuration file, and it will overwrite the local changes with the remote changes without creating a commit. The pull -> add -> push -> commit order is incorrect, as it will not create a commit before pushing the changes, and it will create a commit that is not synchronized with the remote branch. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 20: Writing and Executing Bash Shell Scripts, page 579.

A systems administrator is tasked with mounting a USB drive on a system. The USB drive has a single partition, and it has been mapped by the system to the device /dev/sdb. Which of the following commands will mount the USB to /media/usb?

A.
mount /dev/sdb1 /media/usb
A.
mount /dev/sdb1 /media/usb
Answers
B.
mount /dev/sdb0 /media/usb
B.
mount /dev/sdb0 /media/usb
Answers
C.
mount /dev/sdb /media/usb
C.
mount /dev/sdb /media/usb
Answers
D.
mount -t usb /dev/sdb1 /media/usb
D.
mount -t usb /dev/sdb1 /media/usb
Answers
Suggested answer: A

Explanation:

The mount /dev/sdb1 /media/usb command will mount the USB drive to /media/usb. This command will attach the filesystem on the first partition of the USB drive (/dev/sdb1) to the mount point /media/usb, making it accessible to the system. The mount /dev/sdb0 /media/usb command is invalid, as there is no such device as /dev/sdb0. The mount /dev/sdb /media/usb command is incorrect, as it will try to mount the entire USB drive instead of its partition, which may cause errors or data loss. The mount -t usb /dev/sdb1 /media/usb command is incorrect, as usb is not a valid filesystem type for mount. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 14: Managing Disk Storage, page 455.

A developer reported an incident involving the application configuration file /etc/httpd/conf/httpd.conf that is missing from the server. Which of the following identifies the RPM package that installed the configuration file?

A.
rpm -qf /etc/httpd/conf/httpd.conf
A.
rpm -qf /etc/httpd/conf/httpd.conf
Answers
B.
rpm -ql /etc/httpd/conf/httpd.conf
B.
rpm -ql /etc/httpd/conf/httpd.conf
Answers
C.
rpm -query /etc/httpd/conf/httpd.conf
C.
rpm -query /etc/httpd/conf/httpd.conf
Answers
D.
rpm -q /etc/httpd/conf/httpd.conf
D.
rpm -q /etc/httpd/conf/httpd.conf
Answers
Suggested answer: A

Explanation:

The rpm -qf /etc/httpd/conf/httpd.conf command will identify the RPM package that installed the configuration file. This command will query the database of installed packages and display the name of the package that owns the specified file. The rpm -ql /etc/httpd/conf/httpd.conf command is invalid, as -ql is not a valid option for rpm. The rpm --query /etc/httpd/conf/httpd.conf command is incorrect, as --query requires a package name, not a file name. The rpm -q /etc/httpd/conf/httpd.conf command is incorrect, as -q requires a package name, not a file name. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 19: Managing Packages and Software, page 560.

Joe, a user, is unable to log in to the Linux system Given the following output:

Which of the following command would resolve the issue?

A.
usermod -s /bin/bash joe
A.
usermod -s /bin/bash joe
Answers
B.
pam_tally2 -u joe -r
B.
pam_tally2 -u joe -r
Answers
C.
passwd -u joe
C.
passwd -u joe
Answers
D.
chage -E 90 joe
D.
chage -E 90 joe
Answers
Suggested answer: B

Explanation:

Based on the output of the image sent by the user, Joe is unable to log in to the Linux system because his account has been locked due to too many failed login attempts. The pam_tally2 -u joe -r command will resolve this issue by resetting Joe's failed login counter to zero and unlocking his account. This command uses the pam_tally2 module to manage user account locking based on login failures. The usermod -s /bin/bash joe command will change Joe's login shell to /bin/bash, but this will not unlock his account. The passwd -u joe command will unlock Joe's password if it has been locked by passwd -l joe, but this will not reset his failed login counter or unlock his account if it has been locked by pam_tally2. The chage -E 90 joe command will set Joe's account expiration date to 90 days from today, but this will not unlock his account or reset his failed login counter. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Securing Linux Systems, page 537.

A cloud engineer needs to launch a container named web-01 in background mode. Which of the following commands will accomplish this task''

A.
docker builder -f -name web-01 httpd
A.
docker builder -f -name web-01 httpd
Answers
B.
docker load --name web-01 httpd
B.
docker load --name web-01 httpd
Answers
C.
docker ps -a --name web-01 httpd
C.
docker ps -a --name web-01 httpd
Answers
D.
docker run -d --name web-01 httpd
D.
docker run -d --name web-01 httpd
Answers
Suggested answer: D

Explanation:

The docker run -d --name web-01 httpd command will launch a container named web-01 in background mode. This command will create and start a new container from the httpd image, assign it the name web-01, and run it in detached mode (-d), which means the container will run in the background without attaching to the current terminal. The docker builder -f --name web-01 httpd command is invalid, as builder is not a valid docker command, and -f and --name are not valid options for docker build. The docker load --name web-01 httpd command is invalid, as load does not accept a --name option, and httpd is not a valid file name for load. The docker ps -a --name web-01 httpd command is invalid, as ps does not accept a --name option, and httpd is not a valid filter for ps. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 16: Virtualization and Cloud Technologies, page 499.

Which of the following tools is BEST suited to orchestrate a large number of containers across many different servers?

A.
Kubernetes
A.
Kubernetes
Answers
B.
Ansible
B.
Ansible
Answers
C.
Podman
C.
Podman
Answers
D.
Terraform
D.
Terraform
Answers
Suggested answer: A

Explanation:

The tool that is best suited to orchestrate a large number of containers across many different servers is Kubernetes. Kubernetes is an open-source platform for managing containerized applications and services. Kubernetes allows the administrator to deploy, scale, and update containers across a cluster of servers, as well as to automate the configuration and coordination of the containers. Kubernetes also provides features such as service discovery, load balancing, storage management, security, monitoring, and logging. Kubernetes can handle complex and dynamic workloads and ensure high availability and performance of the containers. Kubernetes is the tool that is best suited to orchestrate a large number of containers across many different servers. This is the correct answer to the question. The other options are incorrect because they either do not orchestrate containers (Ansible or Terraform) or do not operate across many different servers (Podman). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 19: Managing Cloud and Virtualization Technologies, page 573.

Total 371 questions
Go to page: of 38