Spring Sale Discount Flat 70% Offer - Ends in 0d 00h 00m 00s - Coupon code: 70diswrap

CompTIA XK0-006 Dumps

Page: 1 / 9
Total 87 questions

CompTIA Linux+ V8 Exam Questions and Answers

Question 1

A new drive was recently added to a Linux system. Using the environment and tokens provided, complete the following tasks:

• Create an appropriate device label.

• Format and create an ext4 file system on the new partition.

The current working directory is /.

as

Options:

Question 2

Which of the following utilities supports the automation of security compliance and vulnerability management?

Options:

A.

SELinux

B.

Nmap

C.

AIDE

D.

OpenSCAP

Question 3

A systems administrator needs to enable routing of IP packets between network interfaces. Which of the following kernel parameters should the administrator change?

Options:

A.

net.ipv4.ip_multicast

B.

net.ipv4.ip_route

C.

net.ipv4.ip_local_port_range

D.

net.ipv4.ip_forward

Question 4

Which of the following commands should an administrator use to convert a KVM disk file to a different format?

Options:

A.

qemu-kvm

B.

qemu-ng

C.

qemu-io

D.

qemu-img

Question 5

Which of the following commands should an administrator use to see a full hardware inventory of a Linux system?

Options:

A.

dmidecode

B.

lsmod

C.

dmesg

D.

lscpu

Question 6

A systems administrator is preparing a Linux system for application setup. The administrator needs to create an environment variable with a persistent value in one of the user accounts. Which of the following commands should the administrator use for this task?

Options:

A.

export "VAR=SomeValue" >> ~/.ssh/profile

B.

export VAR=value

C.

VAR=value

D.

echo "export VAR=value" >> ~/.bashrc

Question 7

A Linux systems administrator needs to extract the contents of a file named /home/dev/web.bkp to the /var/www/html/ directory. Which of the following commands should the administrator use?

Options:

A.

cd /var/www/html/ && gzip -c /home/dev/web.bkp | tar xf -

B.

pushd /var/www/html/ && cpio -idv < /home/dev/web.bkp && popd

C.

tar -c -f /home/dev/web.bkp /var/www/html/

D.

unzip -c /home/dev/web.bkp /var/www/html/

Question 8

An administrator is investigating the reason a Linux workstation is not resolving the website The administrator executes some commands and receives the following output:

as

Which of the following is the most likely cause?

Options:

A.

The static entry needs to be removed from /etc/hosts.

B.

The remote website does not support IPv6, and the workstation requires it.

C.

The firewall needs to be modified to allow outbound HTTP and HTTPS.

D.

The nameserver in /etc/resolv.conf needs to be updated to 8.8.8.8

Question 9

A Linux administrator needs to securely erase the contents of a hard disk. Which of the following commands is the best for this task?

Options:

A.

sudo rm -rf /dev/sda1

B.

sudo shred /dev/sda1

C.

sudo parted rm /dev/sda1

D.

sudo dd if=/dev/null of=/dev/sda1

Question 10

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?

Options:

A.

groupmod -g Ansible -n /opt/Ansible

B.

chown -R Ansible:Ansible /opt/Ansible

C.

usermod -aG Ansible /opt/Ansible

D.

chmod -c /opt/Ansible

Question 11

A Linux administrator receives reports about MySQL service availability issues. The administrator observes the following information:

    uptime -p shows the system has been up for only 2 minutes

    journalctl shows messages indicating:mysqld invoked oom-killermysqld cpuset=/ mems_allowed=0

Which of the following explains why the server was offline?

Options:

A.

The process exhausted server memory.

B.

The process was intentionally terminated by a privileged user.

C.

The process crashed because of a filesystem error.

D.

A network outage caused a service availability issue.

Question 12

Which of the following best describes journald?

Options:

A.

A system service that collects and stores logging data

B.

A feature that creates crash dumps in case of kernel failure

C.

A service responsible for keeping the filesystem journal

D.

A service responsible for writing audit records to a disk

Question 13

A Linux systems administrator is running an important maintenance task that consumes a large amount of CPU, causing other applications to slow. Which of the following actions should the administrator take to help alleviate the issue?

Options:

A.

Increase the available CPU time with pidstat.

B.

Lower the priority of the maintenance task with renice.

C.

Run the maintenance task with nohup.

D.

Execute the other applications with the bg utility.

Question 14

An administrator wants to search a file named myFile and look for all occurrences of strings containing at least five characters, where characters two and five are i, but character three is not b. Which of the following commands should the administrator execute to get the intended result?

Options:

A.

grep .a*^b-.a myFile

B.

grep .a., [a] myFile

C.

grepa^b*a myFile

D.

grep .i[^b].i myFile

Question 15

An administrator is trying to terminate a process that is not responding. Which of the following commands should the administrator use in order to force the termination of the process?

Options:

A.

kill PID

B.

kill -1 PID

C.

kill -9 PID

D.

kill -15 PID

Question 16

Users cannot access an application that is running inside containers. The administrator wants to validate whether the containers are running. Which of the following commands should the administrator use?

Options:

A.

docker start

B.

docker ps

C.

docker run

D.

docker images

Question 17

A Linux administrator receives reports that an application hosted in a system is not completing tasks in the allocated time. The administrator connects to the system and obtains the following details:

as

Which of the following actions can the administrator take to help speed up the jobs?

Options:

A.

Increase the amount of free memory available to the system.

B.

Increase the amount of CPU resources available to the system.

C.

Increase the amount of swap space available to the system.

D.

Increase the amount of disks available to the system.

Question 18

In the echo "profile-$num-$name" line of a shell script, the variable $num seems to not be expanding during execution. Which of the following notations ensures the value is expanded?

Options:

A.

echo "profile-$(num)-$name"

B.

echo 'profile-$num-$name'

C.

echo "profile-'$num'-$name"

D.

echo "profile-${num}-$name"

Question 19

Which of the following best describes a use case for playbooks in a Linux system?

Options:

A.

To provide a set of tasks and configurations to deploy an application

B.

To provide the instructions for implementing version control on a repository

C.

To provide the security information required for a container

D.

To provide the storage volume information required for a pod

Question 20

An administrator added a new disk to expand the current storage. Which of the following commands should the administrator run first to add the new disk to the LVM?

Options:

A.

vgextend

B.

lvextend

C.

pvcreate

D.

pvresize

Question 21

A DevOps engineer needs to create a local Git repository. Which of the following commands should the engineer use?

Options:

A.

git init

B.

git clone

C.

git config

D.

git add

Question 22

An administrator needs to remove the directory /home/user1/data and all of its contents. Which of the following commands should the administrator use?

Options:

A.

rmdir -p /home/user1/data

B.

ln -d /home/user1/data

C.

rm -r /home/user1/data

D.

cut -d /home/user1/data

Question 23

Which of the following commands should a Linux administrator use to determine the version of a kernel module?

Options:

A.

modprobe bluetooth

B.

lsmod bluetooth

C.

depmod bluetooth

D.

modinfo bluetooth

Question 24

Which of the following most accurately describes a webhook?

Options:

A.

An authentication method for web-server communication

B.

An SNMP-based API for network device monitoring

C.

A means to transmit sensitive information between systems

D.

An HTTP-based callback function

Question 25

An administrator attempts to install updates on a Linux system but receives error messages regarding a specific repository. Which of the following commands should the administrator use to verify that the repository is installed and enabled?

Options:

A.

yum repo-pkgs

B.

yum list installed repos

C.

yum reposync available

D.

yum repolist all

Question 26

Which of the following best describes the role of initrd?

Options:

A.

It is required to connect to the system via SSH.

B.

It contains basic kernel modules and drivers required to start the system.

C.

It contains trusted certificates and secret keys of the system.

D.

It is required to initialize a random device within a Linux system.

Page: 1 / 9
Total 87 questions