Labour Day - Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dpm65

XK0-005 CompTIA Linux+ Exam Questions and Answers

Questions 4

Which of the following data structures is written in JSON?

A)

XK0-005 Question 4

B)

XK0-005 Question 4

C)

XK0-005 Question 4

D)

XK0-005 Question 4

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 5

Which of the following enables administrators to configure and enforce MFA on a Linux system?

Options:

A.

Kerberos

B.

SELinux

C.

PAM

D.

PKI

Buy Now
Questions 6

A Linux administrator is installing a web server and needs to check whether web traffic has already been allowed through the firewall. Which of the following commands should the administrator use to accomplish this task?

Options:

A.

firewalld query-service-http

B.

firewall-cmd --check-service http

C.

firewall-cmd --query-service http

D.

firewalld --check-service http

Buy Now
Questions 7

A Linux administrator is troubleshooting the root cause of a high CPU load and average.

XK0-005 Question 7

Which of the following commands will permanently resolve the issue?

Options:

A.

renice -n -20 6295

B.

pstree -p 6295

C.

iostat -cy 1 5

D.

kill -9 6295

Buy Now
Questions 8

A systems administrator is trying to track down a rogue process that has a TCP listener on a network interface for remote command-and-control instructions.

Which of the following commands should the systems administrator use to generate a list of rogue process names? (Select two).

Options:

A.

netstat -antp | grep LISTEN

B.

lsof -iTCP | grep LISTEN

C.

lsof -i:22 | grep TCP

D.

netstat -a | grep TCP

E.

nmap -p1-65535 | grep -i tcp

F.

nmap -sS 0.0.0.0/0

Buy Now
Questions 9

An administrator needs to increase the system priority of a process with PID 2274. Which of the following commands should the administrator use to

accomplish this task?

Options:

A.

renice —n —15 2274

B.

nice -15 2274

C.

echo "—15" > /proc/PID/2274/priority

D.

ps —ef I grep 2274

Buy Now
Questions 10

A cloud engineer needs to check the link status of a network interface named eth1 in a Linux server. Which of the following commands can help to achieve the goal?

Options:

A.

ifconfig hw eth1

B.

netstat -r eth1

C.

ss -ti eth1

D.

ip link show eth1

Buy Now
Questions 11

A systems administrator is configuring a Linux system so the network traffic from the internal network 172.17.0.0/16 going out through the eth0 interface would appear as if it was sent directly from this interface. Which of the following commands will accomplish this task?

Options:

A.

iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE

B.

firewalld -A OUTPUT -s 172.17.0.0/16 -o eth0 -j DIRECT

C.

nmcli masq-traffic eth0 -s 172.17.0.0/16 -j MASQUERADE

D.

ifconfig -- nat eth0 -s 172.17.0.0/16 -j DIRECT

Buy Now
Questions 12

An engineer needs to insert a character at the end of the current line in the vi text editor. Which of the following will allow the engineer to complete this task?

Options:

A.

p

B.

r

C.

bb

D.

A

E.

i

Buy Now
Questions 13

A development team asks an engineer to guarantee the persistency of journal log files across system reboots. Which of the following commands would accomplish this task?

Options:

A.

grep -i auto /etc/systemd/journald.conf && systemct1 restart systemd-journald.service

B.

cat /etc/systemd/journald.conf | awk '(print $1,$3)'

C.

sed -i 's/auto/persistent/g' /etc/systemd/journald.conf && sed -i 'persistent/s/ˆ#//q' /etc/systemd/journald.conf

D.

journalctl --list-boots && systemct1 restart systemd-journald.service

Buy Now
Questions 14

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?

Options:

A.

rpm -qa | grep kernel; uname -a

B.

yum -y update; shutdown -r now

C.

cat /etc/centos-release; rpm -Uvh --nodeps

D.

telinit 1; restorecon -Rv /boot

Buy Now
Questions 15

Users have been unable to reach www.comptia.org from a Linux server. A systems administrator is troubleshooting the issue and does the following:

XK0-005 Question 15

Based on the information above, which of the following is causing the issue?

Options:

A.

The name www.comptia.org does not point to a valid IP address.

B.

The server 192.168.168.53 is unreachable.

C.

No default route is set on the server.

D.

The network interface eth0 is disconnected.

Buy Now
Questions 16

The administrator comptia is not able to perform privileged functions on a newly deployed system. Given the following command outputs:

XK0-005 Question 16

Which of the following is the reason that the administrator is unable to perform the assigned duties?

Options:

A.

The administrator needs a password reset.

B.

The administrator is not a part of the correct group.

C.

The administrator did not update the sudo database.

D.

The administrator's credentials need to be more complex.

Buy Now
Questions 17

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?

Options:

A.

grub-install /dev/hda

B.

grub-install /dev/sda

C.

grub-install /dev/sr0

D.

grub-install /dev/hd0,0

Buy Now
Questions 18

A systems administrator requires that all files that are created by the user named web have read-only permissions by the owner. Which of the following commands will satisfy this requirement?

Options:

A.

chown web:web /home/web

B.

chmod -R 400 /home/web

C.

echo "umask 377" >> /home/web/.bashrc

D.

setfacl read /home/web

Buy Now
Questions 19

A systems engineer has deployed a new application server, but the server cannot communicate with the backend database hostname. The engineer confirms that the application server can ping the database server's IP address. Which of the following is the most likely cause of the issue?

Options:

A.

Incorrect DNS servers

B.

Unreachable default gateway

C.

Missing route configuration

D.

Misconfigured subnet mask

Buy Now
Questions 20

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? (Select TWO).

Options:

A.

rmmod

B.

Is -11 /etc

C.

Ishw —class disk

D.

pvdisplay

E.

rmdir /dev

F.

dmesg

Buy Now
Questions 21

An application developer received a file with the following content:

##This is a sample Image ##

FROM ubuntu:18.04

MAINTAINER demohut@gtmail.com.hac

COPY . /app

RUN make /app

CMD python /app/app.py

RUN apt-get update

RUN apt-get install -y nginx

CMD ["echo","Image created"]

The developer must use this information to create a test bed environment and identify the image (myimage) as the first version for testing a new

application before moving it to production. Which of the following commands will accomplish this task?

Options:

A.

docker build -t myimage:1.0 .

B.

docker build -t myimage: .

C.

docker build -t myimage-1.0 .

D.

docker build -i myimage:1.0 .

Buy Now
Questions 22

A senior Linux administrator has created several scripts that will be used to install common system applications. These scripts are published to a reposito-ry to share with the systems team. A junior Linux administrator needs to re-trieve the scripts and make them available on a local workstation. Which of the following Git commands should the junior Linux administrator use to accom-plish this task?

Options:

A.

fetch

B.

checkout

C.

clone

D.

branch

Buy Now
Questions 23

A systems administrator receives reports that several virtual machines in a host are responding slower than expected. Upon further investigation, the administrator obtains the following output from one of the affected systems:

XK0-005 Question 23

Which of the following best explains the reported issue?

Options:

A.

The physical host is running out of CPU resources, leading to insufficient CPU time being allocated to virtual machines.

B.

The physical host has enough CPU cores, leading to users running more processes to compensate for the slower response times.

C.

The virtual machine has enough CPU cycles, leading to the system use percentage being higher than expected.

D.

The virtual machine is running out of CPU resources, leading to users experiencing longer response times.

Buy Now
Questions 24

A systems administrator is troubleshooting connectivity issues and trying to find out why a Linux server is not able to reach other servers on the same subnet it is connected to. When listing link parameters, the following is presented:

XK0-005 Question 24

Based on the output above, which of following is the MOST probable cause of the issue?

Options:

A.

The address ac:00:11:22:33:cd is not a valid Ethernet address.

B.

The Ethernet broadcast address should be ac:00:11:22:33:ff instead.

C.

The network interface eth0 is using an old kernel module.

D.

The network interface cable is not connected to a switch.

Buy Now
Questions 25

In order to copy data from another VLAN, a systems administrator wants to temporarily assign IP address 10.0.6 5/24 to the newly added network interface enp1s0f1. Which of the following commands should the administrator run to achieve the goal?

Options:

A.

ip addr add 10.0.6.5/24 dev enpls0f1

B.

echo "IPV4_ADDRESS=10.0.6.5/24" > /etc/sysconfig/network-scripts/ifcfg-enplsOfl

C.

ifconfig 10.0.6.5/24 enpsIs0f1

D.

nmcli conn add lpv4.address-10.0.6.5/24 ifname enpls0f1

Buy Now
Questions 26

A Linux administrator needs to create a symlink for /usr/local/bin/app-a, which was installed in /usr/local/share/app-a. Which of the following commands should the administrator use?

Options:

A.

In -s /usr/local/bin/app-a /usr/local/share/app-a

B.

mv -f /usr/local/share/app-a /usr/local/bin/app-a

C.

cp -f /usr/local/share/app-a /usr/local/bin/app-a

D.

rsync -a /usr/local/share/app-a /usr/local/bin/app-a

Buy Now
Questions 27

A Linux user is trying to execute commands with sudo but is receiving the following error:

$ sudo visudo

>>> /etc/sudoers: syntax error near line 28 <<<

sudo: parse error in /etc/sudoers near line 28

sudo: no valid sudoers sources found, quitting

The following output is provided:

# grep root /etc/shadow

root :* LOCK *: 14600 ::::::

Which of the following actions will resolve this issue?

Options:

A.

Log in directly using the root account and comment out line 28 from /etc/sudoers.

B.

Boot the system in single user mode and comment out line 28 from /etc/sudoers.

C.

Comment out line 28 from /etc/sudoers and try to use sudo again.

D.

Log in to the system using the other regular user, switch to root, and comment out line 28 from /etc/sudoers.

Buy Now
Questions 28

An administrator would like to list all current containers, regardless of their running state. Which of the following commands would allow the administrator to accomplish this task?

Options:

A.

docker ps -a

B.

docker list

C.

docker image ls

D.

docker inspect image

Buy Now
Questions 29

A Linux administrator is alerted to a storage capacity issue on a server without a specific mount point or directory. Which of the following commands would be MOST helpful for troubleshooting? (Choose two.)

Options:

A.

parted

B.

df

C.

mount

D.

du

E.

fdisk

F.

dd

G.

ls

Buy Now
Questions 30

A systems administrator was tasked with assigning the temporary IP address/netmask 192.168.168.1/255.255.255.255 to the interface eth0 of a Linux server.

When adding the address, the following error appears:

# ip address add 192.168.168.1/33 dev eth0

Error: any valid prefix is expected rather than "192.168.168.1/33".

Based on the command and its output above, which of the following is the cause of the issue?

Options:

A.

The CIDR value /33 should be /32 instead.

B.

There is no route to 192.168.168.1/33.

C.

The interface eth0 does not exist.

D.

The IP address 192.168.168.1 is already in use.

Buy Now
Questions 31

Users have been unable to save documents to /home/tmp/temp and have been receiving the following error:

Path not found

A junior technician checks the locations and sees that /home/tmp/tempa was accidentally created instead of /home/tmp/temp. Which of the following commands should the technician use to fix this issue?

Options:

A.

cp /home/tmp/tempa /home/tmp/temp

B.

mv /home/tmp/tempa /home/tmp/temp

C.

cd /temp/tmp/tempa

D.

ls /home/tmp/tempa

Buy Now
Questions 32

The security team has identified a web service that is running with elevated privileges A Linux administrator is working to change the systemd service file to meet security compliance standards. Given the following output:

XK0-005 Question 32

Which of the following remediation steps will prevent the web service from running as a privileged user?

Options:

A.

Removing the ExecStarWusr/sbin/webserver -D SOPTIONS from the service file

B.

Updating the Environment File line in the [Service] section to/home/webservice/config

C.

Adding the User-webservice to the [Service] section of the service file

D.

Changing the:nulti-user.target in the [Install] section to basic.target

Buy Now
Questions 33

A Linux administrator is troubleshooting an issue in which users are not able to access https://portal.comptia.org from a specific workstation. The

administrator runs a few commands and receives the following output:

XK0-005 Question 33

Which of the following tasks should the administrator perform to resolve this issue?

Options:

A.

Update the name server in resolv. conf to use an external DNS server.

B.

Remove the entry for portal . comptia.org from the local hosts file.

C.

Add a network route from the 10.10.10.0/24 to the 192.168.0.0/16.

D.

Clear the local DNS cache on the workstation and rerun the host command.

Buy Now
Questions 34

A junior developer is unable to access an application server and receives the following output:

XK0-005 Question 34

The systems administrator investigates the issue and receives the following output:

XK0-005 Question 34

Which of the following commands will help unlock the account?

Options:

A.

Pam_tally2 --user=dev2 —-quiet

B.

pam_ tally2 --user=dev2

C.

pam_tally2 -–user+dev2 —-quiet

D.

pam_tally2 --user=dev2 —-reset

Buy Now
Questions 35

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?

Options:

A.

dd of=/dev/sda if=/tmp/sda.img

B.

dd if=/dev/sda of=/tmp/sda.img

C.

dd --if=/dev/sda --of=/tmp/sda.img

D.

dd --of=/dev/sda --if=/tmp/sda.img

Buy Now
Questions 36

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?

Options:

A.

route -i etho -p add 10.0.213.5 10.0.5.1

B.

route modify eth0 +ipv4.routes "10.0.213.5/32 10.0.5.1"

C.

echo "10.0.213.5 10.0.5.1 eth0" > /proc/net/route

D.

ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0

Buy Now
Questions 37

Which of the following specifications is used to perform disk encryption in a Linux system?

Options:

A.

LUKS

B.

TLS

C.

SSL

D.

NFS

Buy Now
Questions 38

Application code is stored in Git. Due to security concerns, the DevOps engineer does not want to keep a sensitive configuration file, app . conf, in the

repository. Which of the following should the engineer do to prevent the file from being uploaded to the repository?

Options:

A.

Run git exclude app. conf.

B.

Run git stash app. conf.

C.

Add app . conf to . exclude.

D.

Add app . conf to . gitignore.

Buy Now
Questions 39

A systems administrator is tasked with changing the default shell of a system account in order to disable iterative logins. Which of the following is the

best option for the administrator to use as the new shell?

Options:

A.

/sbin/nologin

B.

/bin/ sh

C.

/sbin/ setenforce

D.

/bin/bash

Buy Now
Questions 40

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?

Options:

A.

partprobe

vgcreate

lvextend

B.

lvcreate

fdisk

partprobe

C.

fdisk

partprobe

mkfs

D.

fdisk

pvcreate

vgextend

Buy Now
Questions 41

A systems administrator is installing various software packages using a pack-age manager. Which of the following commands would the administrator use on the Linux server to install the package?

Options:

A.

winget

B.

softwareupdate

C.

yum-config

D.

apt

Buy Now
Questions 42

A Linux engineer needs to block an incoming connection from the IP address 2.2.2.2 to a secure shell server and ensure the originating IP address receives a response that a firewall is blocking the connection. Which of the following commands can be used to accomplish this task?

Options:

A.

iptables -A INPUT -p tcp -- dport ssh -s 2.2.2.2 -j DROP

B.

iptables -A INPUT -p tcp -- dport ssh -s 2.2.2.2 -j RETURN

C.

iptables -A INPUT -p tcp -- dport ssh -s 2.2.2.2 -j REJECT

D.

iptables -A INPUT -p tcp -- dport ssh -s 2.2.2.2 -j QUEUE

Buy Now
Questions 43

A systems administrator received a request to change a user's credentials. Which of the following commands will grant the request?

Options:

A.

sudo passwd

B.

sudo userde 1

C.

sudo chage

D.

sudo usermod

Buy Now
Questions 44

A Linux administrator needs to determine whether a hostname is in the DNS. Which of the following would supply the information that is needed?

Options:

A.

nslookup

B.

rsynс

C.

netstat

D.

host

Buy Now
Questions 45

A Linux administrator would like to use systemd to schedule a job to run every two hours. The administrator creates timer and service definitions and restarts the server to load these new configurations. After the restart, the administrator checks the log file and notices that the job is only running daily. Which of the following is MOST likely causing the issue?

Options:

A.

The checkdiskspace.service is not running.

B.

The checkdiskspace.service needs to be enabled.

C.

The OnCalendar schedule is incorrect in the timer definition.

D.

The system-daemon services need to be reloaded.

Buy Now
Questions 46

After connecting to a remote host via SSH, an administrator attempts to run an application but receives the following error:

[user@workstation ~]$ ssh admin@srv1

Last login: Tue Mar 29 18:03:34 2022

[admin@srvl ~] $ /usr/local/bin/config_manager

Error: cannot open display:

[admin@srv1 ~] $

Which of the following should the administrator do to resolve this error?

Options:

A.

Disconnect from the SSH session and reconnect using the ssh -x command.

B.

Add Options X11 to the /home/admin/.ssh/authorized_keys file.

C.

Open port 6000 on the workstation and restart the firewalld service.

D.

Enable X11 forwarding in /etc/ssh/ssh_config and restart the server.

Buy Now
Questions 47

Which of the following technologies provides load balancing, encryption, and observability in containerized environments?

Options:

A.

Virtual private network

B.

Sidecar pod

C.

Overlay network

D.

Service mesh

Buy Now
Questions 48

A Linux administrator needs to determine if prerequisites are met. One of the application requirements is to install Perl on a system. Which of the following commands would accomplish this task?

Options:

A.

rpm -Ufperl

B.

rpm -ivperl

C.

rpm -qaperl

D.

rpm -ehperl

Buy Now
Questions 49

A server is experiencing intermittent connection issues. Some connections to the Internet work as intended, but some fail as if there is no connectivity. The systems administrator inspects the server configuration:

XK0-005 Question 49

Which of the following is MOST likely the cause of the issue?

Options:

A.

An internal-only DNS server is configured.

B.

The IP netmask is wrong for ens3.

C.

Two default routes are configured.

D.

The ARP table contains incorrect entries.

Buy Now
Questions 50

A systems administrator has been unable to terminate a process. Which of the following should the administrator use to forcibly stop the process?

Options:

A.

kill -1

B.

kill -3

C.

kill -15

D.

kill -HUP

E.

kill -TERM

Buy Now
Questions 51

An administrator recently updated the BIND software package and would like to review the default configuration that shipped with this version. Which of the following files should the administrator review?

Options:

A.

/etc/named.conf.rpmnew

B.

/etc/named.conf.rpmsave

C.

/etc/named.conf

D.

/etc/bind/bind.conf

Buy Now
Questions 52

The application team has reported latency issues that are causing the application to crash on the Linux server. The Linux administrator starts

troubleshooting and receives the following output:

XK0-005 Question 52

Which of the following commands will improve the latency issue?

Options:

A.

# echo 'net.core.net_backlog = 5000000' >> /etc/sysctl.conf

# sysctl -p

# systemctl daemon-reload

B.

# ifdown eth0

# ip link set dev eth0 mtu 800

# ifup eth0

C.

# systemctl stop network

# ethtool -g eth0 512

# systemctl start network

D.

# echo 'net.core.rmem max = 12500000' >> /etc/sysctl.conf

# echo 'net.core.wmem_max = 12500000' >> /etc/sysctl.conf

# sysctl -p

Buy Now
Questions 53

A Linux system is getting an error indicating the root filesystem is full. Which of the following commands should be used by the systems administrator to resolve this issue? (Choose three.)

Options:

A.

df -h /

B.

fdisk -1 /dev/sdb

C.

growpart /dev/mapper/rootvg-rootlv

D.

pvcreate /dev/sdb

E.

lvresize –L +10G -r /dev/mapper/rootvg-rootlv

F.

lsblk /dev/sda

G.

parted -l /dev/mapper/rootvg-rootlv

Buy Now
Questions 54

A newly created container has been unable to start properly, and a Linux administrator is analyzing the cause of the failure. Which of the following will allow the administrator to determine the FIRST command that is executed inside the container right after it starts?

Options:

A.

docker export

B.

docker info

C.

docker start

D.

docker inspect

Buy Now
Questions 55

A DevOps engineer is working on a local copy of a Git repository. The engineer would like to switch from the main branch to the staging branch but notices the staging branch does not exist. Which of the following Git commands should the engineer use to perform this task?

Options:

A.

git branch —m staging

B.

git commit —m staging

C.

git status —b staging

D.

git checkout —b staging

Buy Now
Questions 56

A systems administrator is tasked with creating an Ansible playbook to automate the installation of patches on several Linux systems. In which of the following languages should the playbook be written?

Options:

A.

SQL

B.

YAML

C.

HTML

D.

JSON

Buy Now
Questions 57

A Linux administrator cloned an existing Linux server and built a new server from that clone. The administrator encountered the following error after booting the cloned server:

XK0-005 Question 57

The administrator performed the commands listed below to further troubleshoot and mount the missing filesystem:

XK0-005 Question 57

Which of the following should administrator use to resolve the device mismatch issue and mount the disk?

Options:

A.

mount disk by device-id

B.

fsck -A

C.

mount disk by-label

D.

mount disk by-blkid

Buy Now
Questions 58

A systems administrator wants to check for running containers. Which of the following commands can be used to show this information?

Options:

A.

docker pull

B.

docker stats

C.

docker ps

D.

docker list

Buy Now
Questions 59

A Linux engineer receives reports that files created within a certain group are being modified by users who are not group members. The engineer wants to reconfigure the server so that only file owners and group members can modify new files by default. Which of the following commands would accomplish this task?

Options:

A.

chmod 775

B.

umask. 002

C.

chactr -Rv

D.

chown -cf

Buy Now
Questions 60

One leg of an LVM-mirrored volume failed due to the underlying physical volume, and a systems administrator is troubleshooting the issue. The following output has been provided:

XK0-005 Question 60

Given this scenario, which of the following should the administrator do to recover this volume?

Options:

A.

Reboot the server. The volume will automatically go back to linear mode.

B.

Replace the failed drive and reconfigure the mirror.

C.

Reboot the server. The volume will revert to stripe mode.

D.

Recreate the logical volume.

Buy Now
Questions 61

A Linux administrator was notified that a virtual server has an I/O bottleneck. The Linux administrator analyzes the following output:

XK0-005 Question 61

Given there is a single CPU in the sever, which of the following is causing the slowness?

Options:

A.

The system is running out of swap space.

B.

The CPU is overloaded.

C.

The memory is exhausted.

D.

The processes are paging.

Buy Now
Questions 62

Users are unable to create new files on the company's FTP server, and an administrator is troubleshooting the issue. The administrator runs the following commands:

XK0-005 Question 62

Which of the following is the cause of the issue based on the output above?

Options:

A.

The users do not have the correct permissions to create files on the FTP server.

B.

The ftpusers filesystem does not have enough space.

C.

The inodes is at full capacity and would affect file creation for users.

D.

ftpusers is mounted as read only.

Buy Now
Questions 63

A Linux administrator found many containers in an exited state. Which of the following commands will allow the administrator to clean up the containers in an exited state?

Options:

A.

docker rm --all

B.

docker rm $(docker ps -aq)

C.

docker images prune *

D.

docker rm --state exited

Buy Now
Questions 64

An administrator needs to make some changes in the IaC declaration templates. Which of the following commands would maintain version control?

Options:

A.

git clone https://github.com/comptia/linux+-.git

git push origin

B.

git clone https://qithub.com/comptia/linux+-.git

git fetch New-Branch

C.

git clone https://github.com/comptia/linux+-.git

git status

D.

git clone https://github.com/comptia/linuxt+-.git

git checkout -b

Buy Now
Questions 65

A Linux administrator has installed a web server, a database server, and a web application on a server. The web application should be active in order to render the web pages. After the administrator restarts the server, the website displays the following message in the browser: Error establishing a database connection. The Linux administrator reviews the following relevant output from the systemd init files:

XK0-005 Question 65

The administrator needs to ensure that the database is available before the web application is started. Which of the following should the administrator add to the HTTP server .service file to accomplish this task?

Options:

A.

TRIGGERS=mariadb.service

B.

ONFAILURE=mariadb.service

C.

WANTEDBY=mariadb.service

D.

REQUIRES=mariadb.service

Buy Now
Questions 66

An administrator thinks that a package was installed using a snap. Which of the following commands can the administrator use to verify this information?

Options:

A.

snap list

B.

snap find

C.

snap install

D.

snap try

Buy Now
Questions 67

The applications team is reporting issues when trying to access the web service hosted in a Linux system. The Linux systems administrator is reviewing the following outputs:

Output 1:

* httpd.service = The Apache HTTPD Server

Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)

Active: inactive (dead)

Docs: man:httpd(8) man:apachectl(8)

Output 2:

16:51:16 up 28 min, 1 user, load average: 0.00, 0.00, 0.07

Which of the following statements best describe the root cause? (Select two).

Options:

A.

The httpd service is currently started.

B.

The httpd service is enabled to auto start at boot time, but it failed to start.

C.

The httpd service was manually stopped.

D.

The httpd service is not enabled to auto start at boot time.

E.

The httpd service runs without problems.

F.

The httpd service did not start during the last server reboot.

Buy Now
Questions 68

A User on a Linux workstation needs to remotely start an application on a Linux server and then forward the graphical display of that application back to the Linux workstation. Which of the following would enable the user to perform this action?

Options:

A.

ssh -X user@server application

B.

ssh -y user@server application

C.

ssh user@server application

D.

ssh -D user@server application

Buy Now
Questions 69

Users report that connections to a MariaDB service are being closed unexpectedly. A systems administrator troubleshoots the issue and finds the following message in /var/log/messages:

XK0-005 Question 69

Which of the following is causing the connection issue?

Options:

A.

The process mysqld is using too many semaphores.

B.

The server is running out of file descriptors.

C.

Something is starving the server resources.

D.

The amount of RAM allocated to the server is too high.

Buy Now
Questions 70

A Linux engineer finds multiple failed login entries in the security log file for application users. The Linux engineer performs a security audit and discovers a security issue. Given the following:

# grep -iE '*www*|db' /etc/passwd

www-data:x:502:502:www-data:/var/www:/bin/bash

db:x: 505:505:db: /opt/db:/bin/bash

Which of the following commands would resolve the security issue?

Options:

A.

usermod -d /srv/www-data www-data && usermod -d /var/lib/db db

B.

passwd -u www-data && passwd -u db

C.

renice -n 1002 -u 502 && renice -n 1005 -u 505

D.

chsh -s /bin/false www-data && chsh -s /bin/false db

Buy Now
Questions 71

A Linux administrator has been tasked with installing the most recent versions of packages on a RPM-based OS. Which of the following commands will accomplish this task?

Options:

A.

apt-get upgrade

B.

rpm -a

C.

yum updateinfo

D.

dnf update

E.

yum check-update

Buy Now
Questions 72

Which of the following actions are considered good security practices when hardening a Linux server? (Select two).

Options:

A.

Renaming the root account to something else

B.

Removing unnecessary packages

C.

Changing the default shell to /bin/csh

D.

Disabling public key authentication

E.

Disabling the SSH root login possibility

F.

Changing the permissions on the root filesystem to 600

Buy Now
Questions 73

Users in the human resources department are trying to access files in a newly created directory. Which of the following commands will allow the users access to the files?

Options:

A.

chattr

B.

chgrp

C.

chage

D.

chcon

Buy Now
Questions 74

A new application container was built with an incorrect version number. Which of the following commands should be used to rename the image to match the correct version 2.1.2?

Options:

A.

docker tag comptia/app:2.1.1 comptia/app:2.1.2

B.

docker push comptia/app:2.1.1 comptia/app:2.1.2

C.

docker rmi comptia/app:2.1.1 comptia/app:2.1.2

D.

docker update comptia/app:2.1.1 comptia/app:2.1.2

Buy Now
Questions 75

A Linux administrator created the directory /project/access2all. By creating this directory, the administrator is trying to avoid the deletion or modification of files from non-owners. Which of the following will accomplish this goal?

Options:

A.

chmod +t /project/access2all

B.

chmod +rws /project/access2all

C.

chmod 2770 /project/access2all

D.

chmod ugo+rwx /project/access2all

Buy Now
Questions 76

A systems administrator created a new Docker image called test. After building the image, the administrator forgot to version the release. Which of the following will allow the administrator to assign the v1 version to the image?

Options:

A.

docker image save test test:v1

B.

docker image build test:vl

C.

docker image tag test test:vl

D.

docker image version test:v1

Buy Now
Questions 77

A Linux administrator is troubleshooting SSH connection issues from one of the workstations.

When users attempt to log in from the workstation to a server with the IP address 104.21.75.76, they receive the following message:

XK0-005 Question 77

The administrator reviews the information below:

XK0-005 Question 77

XK0-005 Question 77

Which of the following is causing the connectivity issue?

Options:

A.

The workstation has the wrong IP settings.

B.

The sshd service is disabled.

C.

The server’s firewall is preventing connections from being made.

D.

The server has an incorrect default gateway configuration.

Buy Now
Questions 78

As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following:

Add relevant content to /tmp/script.sh, so that it finds and compresses rotated files in /var/log without recursion.

INSTRUCTIONS

Fill the blanks to build a script that performs the actual compression of rotated log files.

If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.

XK0-005 Question 78

Options:

Buy Now
Questions 79

Which of the following technologies can be used as a central repository of Linux users and groups?

Options:

A.

LDAP

B.

MFA

C.

SSO

D.

PAM

Buy Now
Questions 80

A cloud engineer needs to block the IP address 192.168.10.50 from accessing a Linux server. Which of the following commands will achieve this goal?

Options:

A.

iptables -F INPUT -j 192.168.10.50 -m DROP

B.

iptables -A INPUT -s 192.168.10.30 -j DROP

C.

iptables -i INPUT --ipv4 192.168.10.50 -z DROP

D.

iptables -j INPUT 192.168.10.50 -p DROP

Buy Now
Questions 81

A systems administrator is receiving tickets from users who cannot reach the application app that should be listening on port 9443/tcp on a Linux server.

To troubleshoot the issue, the systems administrator runs netstat and receives the following output:

XK0-005 Question 81

Based on the information above, which of the following is causing the issue?

Options:

A.

The IP address 0.0.0.0 is not valid.

B.

The application is listening on the loopback interface.

C.

The application is listening on port 1234.

D.

The application is not running.

Buy Now
Questions 82

The development team wants to prevent a file from being modified by all users in a Linux system, including the root account. Which of the following commands can be used to accomplish this objective?

Options:

A.

chmod / app/conf/file

B.

setenforce / app/ conf/ file

C.

chattr +i /app/conf/file

D.

chmod 0000 /app/conf/file

Buy Now
Questions 83

A Linux user reported the following error after trying to connect to the system remotely:

ssh: connect to host 10.0.1.10 port 22: Resource temporarily unavailable

The Linux systems administrator executed the following commands in the Linux system while trying to diagnose this issue:

XK0-005 Question 83

Which of the following commands will resolve this issue?

Options:

A.

firewall-cmd --zone=public --permanent --add-service=22

B.

systemct1 enable firewalld; systemct1 restart firewalld

C.

firewall-cmd --zone=public --permanent --add-service=ssh

D.

firewall-cmd --zone=public --permanent --add-port=22/udp

Buy Now
Questions 84

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?

Options:

A.

rpm —qf /bin/ someapp

B.

rpm —Vv / bin/ someapp

C.

rpm - P / bin/ some app

D.

rpm —i / bin/ someapp

Buy Now
Questions 85

An administrator runs ping comptia.org. The result of the command is:

ping: comptia.org: Name or service not known

Which of the following files should the administrator verify?

Options:

A.

/etc/ethers

B.

/etc/services

C.

/etc/resolv.conf

D.

/etc/sysctl.conf

Buy Now
Questions 86

A Linux administrator has defined a systemd script docker-repository.mount to mount a volume for use by the Docker service. The administrator wants to ensure that Docker

service does not start until the volume is mounted. Which of the following configurations needs to be added to the Docker service definition to best accomplish this task?

Options:

A.

After=docker-respository.mount

B.

ExecStart=/usr/bin/mount -a

C.

Requires=docker-repository.mount

D.

RequiresMountsFor=docker-repository.mount

Buy Now
Questions 87

A systems administrator is deploying three identical, cloud-based servers. The administrator is using the following code to complete the task:

XK0-005 Question 87

Which of the following technologies is the administrator using?

Options:

A.

Ansible

B.

Puppet

C.

Chef

D.

Terraform

Buy Now
Exam Code: XK0-005
Exam Name: CompTIA Linux+ Exam
Last Update: May 3, 2024
Questions: 292

PDF + Testing Engine

$56  $159.99

Testing Engine

$42  $119.99
buy now XK0-005 testing engine

PDF (Q&A)

$35  $99.99
buy now XK0-005 pdf
dumpsmate guaranteed to pass
24/7 Customer Support

DumpsMate's team of experts is always available to respond your queries on exam preparation. Get professional answers on any topic of the certification syllabus. Our experts will thoroughly satisfy you.

Site Secure

mcafee secure

TESTED 06 May 2024