Labour Day Sale Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 713PS592

XK0-005 CompTIA Linux+ Exam Questions and Answers

Questions 4

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 4

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 5

An administrator started a long-running process in the foreground that needs to continue without interruption. Which of the following keystrokes should the administrator use to continue running the process in the background?

Options:

A.

bg

B.

bg

C.

jobs -1

D.

bg &

Buy Now
Questions 6

A user is unable to log on to a Linux workstation. The systems administrator executes the following command:

cat /etc/shadow | grep user1

The command results in the following output:

user1 :! $6$QERgAsdvojadv4asdvaarC/9dj34GdafGVaregmkdsfa:18875:0:99999:7 :::

Which of the following should the systems administrator execute to fix the issue?

Options:

A.

chown -R userl:user1 /home/user1

B.

sed -i '/ ::: / :: /g' /etc/shadow

C.

chgrp user1:user1 /home/user1

D.

passwd -u user1

Buy Now
Questions 7

Users have reported that the interactive sessions were lost on a Linux server. A Linux administrator verifies the server was switched to rescue.target mode for maintenance. Which of the following commands will restore the server to its usual target?

Options:

A.

telinit 0

B.

systemct1 reboot

C.

systemct1 get-default

D.

systemct1 emergency

Buy Now
Questions 8

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 9

An administrator transferred a key for SSH authentication to a home directory on a remote server. The key file was moved to .ssh/authorized_keys location in order to establish SSH connection without a password. However, the SSH command still asked for the password. Given the following output:

XK0-005 Question 9

Which of the following commands would resolve the issue?

Options:

A.

restorecon .ssh/authorized_keys

B.

ssh_keygen -t rsa -o .ssh/authorized_keys

C.

chown root:root .ssh/authorized_keys

D.

chmod 600 .ssh/authorized_keys

Buy Now
Questions 10

A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following:

XK0-005 Question 10

Which of the following commands should replace the string?

Options:

A.

if [ -f "$filename" ]; then

B.

if [ -d "$filename" ]; then

C.

if [ -f "$filename" ] then

D.

if [ -f "$filename" ]; while

Buy Now
Questions 11

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?

Options:

A.

systemct1 status

B.

systemct1 stop

C.

systemct1 reinstall

D.

systemct1 daemon-reload

Buy Now
Questions 12

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 12

Options:

Buy Now
Questions 13

A Linux administrator has set up a new DNS forwarder and is configuring all internal servers to use the new forwarder to look up external DNS requests. The administrator needs to modify the firewall on the server for the DNS forwarder to allow the internal servers to communicate to it and make the changes persistent between server reboots. Which of the following commands should be run on the DNS forwarder server to accomplish this task?

Options:

A.

ufw allow out dns

B.

systemct1 reload firewalld

C.

iptables -A OUTPUT -p udp -ra udp -dport 53 -j ACCEPT

D.

flrewall-cmd --zone-public --add-port-53/udp --permanent

Buy Now
Questions 14

Which of the following should be used to verify the integrity of a file?

Options:

A.

sha256sum

B.

fsck

C.

gpg —d

D.

hashcat

Buy Now
Questions 15

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 16

A Linux administrator intends to start using KVM on a Linux server. Which of the following commands will allow the administrator to load the KVM module as

well as any related dependencies?

Options:

A.

modprobe kvm

B.

insmod kvm

C.

depmod kvm

D.

hotplug kvm

Buy Now
Questions 17

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.

XK0-005 Question 17

Which of the following commands will allow the systems administrator to check whether the system supports virtualization?

Options:

A.

dmidecode -s system-version

B.

lscpu

C.

sysctl -a

D.

cat /sys/device/system/cpu/possible

Buy Now
Questions 18

A Linux systems administrator is setting up a new web server and getting 404 - NOT FOUND errors while trying to access the web server pages from the browser. While working on the diagnosis of this issue, the Linux systems administrator executes the following commands:

XK0-005 Question 18

Which of the following commands will BEST resolve this issue?

Options:

A.

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

B.

restorecon -R -v /var/www/html

C.

setenforce 0

D.

setsebool -P httpd_can_network_connect_db on

Buy Now
Questions 19

A Linux engineer is setting the sticky bit on a directory called devops with 755 file permission. Which of the following commands will accomplish this task?

Options:

A.

chown -s 755 devops

B.

chown 1755 devops

C.

chmod -s 755 devops

D.

chmod 1755 devops

Buy Now
Questions 20

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?

Options:

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

Buy Now
Questions 21

A Linux administrator wants to find out whether files from the wget package have been altered since they were installed. Which of the following commands will provide the correct information?

Options:

A.

rpm -i wget

B.

rpm -qf wget

C.

rpm -F wget

D.

rpm -V wget

Buy Now
Questions 22

After installing some RPM packages, a systems administrator discovers the last package that was installed was not needed. Which of the following commands can be used to remove the package?

Options:

A.

dnf remove packagename

B.

apt-get remove packagename

C.

rpm -i packagename

D.

apt remove packagename

Buy Now
Questions 23

A Linux system is failing to boot. The following error is displayed in the serial console:

[[1;33mDEPEND[Om] Dependency failed for /data.

[[1;33mDEPEND[Om] Dependency failed for Local File Systems

...

Welcome to emergency mode! After logging in, type "journalctl -xb" to viewsystem logs, "systemct1 reboot" to reboot, "systemct1 default" to try again to boot into default mode.

Give root password for maintenance

(or type Control-D to continue}

Which of the following files will need to be modified for this server to be able to boot again?

Options:

A.

/etc/mtab

B.

/dev/sda

C.

/etc/fstab

D.

/ete/grub.conf

Buy Now
Questions 24

Rugged appliances are small appliances with ruggedized hardware and like Quantum Spark appliance they use which operating system?

Options:

A.

Centos Linux

B.

Gaia embedded

C.

Gaia

D.

Red Hat Enterprise Linux version 5

Buy Now
Questions 25

During a security scan, the password of an SSH key file appeared to be too weak and was cracked. Which of the following commands would allow a user to choose a stronger password and set it on the existing SSH key file?

Options:

A.

passwd

B.

ssh

C.

ssh-keygen

D.

pwgen

Buy Now
Questions 26

A Linux administrator needs to ensure that Java 7 and Java 8 are both locally available for developers to use when deploying containers. Currently only Java 8 is available. Which of the following commands should the administrator run to ensure both versions are available?

Options:

A.

docker image load java:7

B.

docker image pull java:7

C.

docker image import java:7

D.

docker image build java:7

Buy Now
Questions 27

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 28

Based on an organization’s new cybersecurity policies, an administrator has been instructed to ensure that, by default, all new users and groups that are created fall within the specified values below.

XK0-005 Question 28

To which of the following configuration files will the required changes need to be made?

Options:

A.

/etc/login.defs

B.

/etc/security/limits.conf

C.

/etc/default/useradd

D.

/etc/profile

Buy Now
Questions 29

Which of the following data structures is written in JSON?

A)

XK0-005 Question 29

B)

XK0-005 Question 29

C)

XK0-005 Question 29

D)

XK0-005 Question 29

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 30

A junior systems administrator has just generated public and private authentication keys for passwordless login. Which of the following files will be moved to the remote servers?

Options:

A.

id_dsa.pem

B.

id_rsa

C.

id_ecdsa

D.

id_rsa.pub

Buy Now
Questions 31

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 31

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 32

A Linux administrator needs to remove software from the server. Which of the following RPM options should be used?

Options:

A.

rpm -s

B.

rрm -d

C.

rpm -q

D.

rpm -e

Buy Now
Questions 33

A Linux administrator provisioned a new web server with custom administrative permissions for certain users. The administrator receives a report that user1 is unable to restart the Apache web service on this server. The administrator reviews the following output:

[ root@server ] # id user1

UID=1011 (user1) gid=1011 (USER1) groups=1011 (user1), 101 (www-data), 1120 (webadmin)

[ root@server ] # cat /etc/sudoers.d/custom.conf

user1 ALL=/usr/sbin/systemctl start httpd, /usr/sbin/systemctl stop httpd

webadmin ALL=NOPASSWD: /etc/init.d.httpd restart, /sbin/service httpd restart, /usr/sbin/apache2ctl restart

#%wheel ALL=(ALL) NOPASSWD: ALL

Which of the following would most likely resolve the issue while maintaining a least privilege security model?

Options:

A.

User1 should be added to the wheel group to manage the service.

B.

User1 should have "NOPASSWD:" after the "ALL=" in the custom. conf.

C.

The wheel line in the custom. conf file should be uncommented.

D.

Webadmin should be listed as a group in the custom. conf file.

Buy Now
Questions 34

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 35

A Linux administrator has logged in to a server for the first time and needs to know which services are allowed through the firewall. Which of the following options will return the results for which the administrator is looking?

Options:

A.

firewall-cmd —get-services

B.

firewall-cmd —check-config

C.

firewall-cmd —list-services

D.

systemct1 status firewalld

Buy Now
Questions 36

A Linux administrator needs to correct the permissions of a log file on the server. Which of the following commands should be used to set filename.log permissions to -rwxr—r--. ?

Options:

A.

chmod 755 filename.log

B.

chmod 640 filename.log

C.

chmod 740 filename.log

D.

chmod 744 filename.log

Buy Now
Questions 37

A systems administrator has been tasked with disabling the nginx service from the environment to prevent it from being automatically and manually started. Which of the following commands will accomplish this task?

Options:

A.

systemct1 cancel nginx

B.

systemct1 disable nginx

C.

systemct1 mask nginx

D.

systemct1 stop nginx

Buy Now
Questions 38

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 39

The journald entries have filled a Linux machine's /var volume. Which of the following is the best command for a systems administrator to use to free up the disk space occupied by these entries?

Options:

A.

journalctl —rotate

journalctl --vacuum-time=ls

B.

systemctl stop systemd-journald

systemctl start systemd-journald

C.

rm -rf /var/log/journal

systemctl restart systemd-journald

D.

pkill -HUP systemd-journald

systemctl restart systemd-journald

Buy Now
Questions 40

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 41

A Linux administrator needs to transfer a local file named accounts . pdf to a remote / tmp directory of a server with the IP address 10.10.10.80. Which of the following commands needs to be executed to transfer this file?

Options:

A.

rsync user@10.10.10.80: /tmp accounts.pdf

B.

scp accounts.pdf user@10.10.10.80:/tmp

C.

cp user@10.10.10. 80: /tmp accounts.pdf

D.

ssh accounts.pdf user@10.10.10.80: /tmp

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 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 44

Due to performance issues on a server, a Linux administrator needs to terminate an unresponsive process. Which of the following commands should the administrator use to terminate the process immediately without waiting for a graceful shutdown?

Options:

A.

kill -SIGKILL 5545

B.

kill -SIGTERM 5545

C.

kill -SIGHUP 5545

D.

kill -SIGINT 5545

Buy Now
Questions 45

A Linux administrator is scheduling a system job that runs a script to check available disk space every hour. The Linux administrator does not want users to be able to start the job. Given the following:

XK0-005 Question 45

The Linux administrator attempts to start the timer service but receives the following error message:

XK0-005 Question 45

Which of the following is MOST likely the reason the timer will not start?

Options:

A.

The checkdiskspace.timer unit should be enabled via systemct1.

B.

The timers.target should be reloaded to get the new configuration.

C.

The checkdiskspace.timer should be configured to allow manual starts.

D.

The checkdiskspace.timer should be started using the sudo command.

Buy Now
Questions 46

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 47

A developer wants to ensure that all files and folders created inside a shared folder named /GroupOODEV inherit the group name of the parent folder. Which of the following commands will help achieve this goal?

Options:

A.

chmod g+X / GroupOODEV/

B.

chmod g+W / GroupOODEV/

C.

chmod g+r / GroupOODEV/

D.

chmod g+s / GroupOODEV/

Buy Now
Questions 48

The group named support is unable to make changes to the config file. An administrator is reviewing the permissions and sees the following:

S Is -1 config

-rw-rw----. 1 root app 4682 02-15 11:25 config

Which of the following should the administrator execute in order to give the support group access to modify the file while preserving the current ownership?

Options:

A.

chown :support config

B.

setfacl -m g:support:rw- config

C.

chmod 664 config

D.

chmod g+s config

Buy Now
Questions 49

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 50

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 51

An administrator would like to mirror the website files on the primary web server, www1, to the backup web server, www2. Which of the following commands

should the administrator use to most efficiently accomplish this task?

Options:

A.

[wwwl ] rsync —a —e ssh /var/www/html/ user1@www2 : /var/www/html

B.

[ wwwl ] scp —r /var/www/html user1@www2 : / var/www/html

C.

[www2 ] cd /var/www/html; wget —m http: //wwwl/

D.

[wwwl ] cd /var/www/html && tar cvf —

Buy Now
Questions 52

A user created the following script file:

# ! /bin/bash

# FILENAME: /home/user/ script . sh

echo "hello world"

exit 1

However, when the user tried to run the script file using the command "script . sh, an error returned indicating permission was denied. Which of the follow-ing should the user execute in

order for the script to run properly?

Options:

A.

chmod u+x /home/user/script . sh

B.

chmod 600 /home/user/script . sh

C.

chmod /home/user/script . sh

D.

chmod 0+r /horne/user/script. sh

Buy Now
Questions 53

A systems administrator is tasked with preventing logins from accounts other than root, while the file /etc/nologin exists. Which of the following PAM modules will accomplish this task?

Options:

A.

pam_login.so

B.

pam_access.so

C.

pam_logindef.so

D.

pam_nologin.so

Buy Now
Questions 54

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?

Options:

A.

mount /dev/sdb1 /media/usb

B.

mount /dev/sdb0 /media/usb

C.

mount /dev/sdb /media/usb

D.

mount -t usb /dev/sdb1 /media/usb

Buy Now
Questions 55

A systems administrator is adding a Linux-based server and removing a Windows-based server from a cloud-based environment. The changes need to be validated before they are applied to the cloud-based environment. Which of the following tools should be used to meet this requirement?

Options:

A.

Ansible

B.

git clone

C.

git pull

D.

terraform plan

Buy Now
Questions 56

A junior administrator is setting up a new Linux server that is intended to be used as a router at a remote site. Which of the following parameters will accomplish this goal?

Options:

A.

XK0-005 Question 56 Option 1

B.

56

C.

56

D.

56

Buy Now
Questions 57

A systems administrator is notified that the mysqld process stopped unexpectedly. The systems administrator issues the following command:

sudo grep –i -r ‘out of memory’ /var/log

The output of the command shows the following:

kernel: Out of memory: Kill process 9112 (mysqld) score 511 or sacrifice child.

Which of the following commands should the systems administrator execute NEXT to troubleshoot this issue? (Select two).

Options:

A.

free -h

B.

nc -v 127.0.0.1 3306

C.

renice -15 $( pidof mysql )

D.

lsblk

E.

killall -15

F.

vmstat -a 1 4

Buy Now
Questions 58

Which of the following is a function of a bootloader?

Options:

A.

It initializes all the devices that are required to load the OS.

B.

It mounts the root filesystem that is required to load the OS.

C.

It helps to load the different kernels to initiate the OS startup process.

D.

It triggers the start of all the system services.

Buy Now
Questions 59

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 59

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 60

A Linux engineer needs to download a ZIP file and wants to set the nice of value to -10 for this new process. Which of the following commands will help to accomplish the task?

Options:

A.

$ nice -v -10 wget https://foo.com/installation.zip

B.

$ renice -v -10 wget https://foo.com/installation.2ip

C.

$ renice -10 wget https://foo.com/installation.zip

D.

$ nice -10 wget https://foo.com/installation.zip

Buy Now
Questions 61

A systems administrator wants to delete app . conf from a Git repository. Which of the following commands will delete the file?

Options:

A.

git tag app. conf

B.

git commit app . conf

C.

git checkout app . conf

D.

git rm app. conf

Buy Now
Questions 62

A Linux administrator is trying to remove the ACL from the file /home/user/data. txt but receives the following error message:

XK0-005 Question 62

Given the following analysis:

XK0-005 Question 62

Which of the following is causing the error message?

Options:

A.

The administrator is not using a highly privileged account.

B.

The filesystem is mounted with the wrong options.

C.

SELinux file context is denying the ACL changes.

D.

File attributes are preventing file modification.

Buy Now
Questions 63

A Linux administrator is providing a new Nginx image from the registry to local cache. Which of the following commands would allow this to happen?

Options:

A.

docker pull nginx

B.

docker attach nginx

C.

docker commit nginx

D.

docker import nginx

Buy Now
Questions 64

A systems administrator wants to list all local accounts in which the UID is greater than 500. Which of the following commands will give the correct

output?

Options:

A.

find /etc/passwd —size +500

B.

cut —d: fl / etc/ passwd > 500

C.

awk -F: ‘$3 > 500 {print $1}' /etc/passwd

D.

sed '/UID/' /etc/passwd < 500

Buy Now
Questions 65

A cloud engineer wants to delete all unused networks that are not referenced by any container. Which of the following commands will achieve this goal?

Options:

A.

docker network erase

B.

docker network clear

C.

docker network prune

D.

docker network rm

Buy Now
Questions 66

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 67

A file called testfile has both uppercase and lowercase letters:

$ cat testfile

ABCDEfgH

IJKLmnoPQ

abcdefgH

ijklLMNopq

A Linux administrator is tasked with converting testfile into all uppercase and writing it to a new file with the name uppercase. Which of the following commands will achieve

this task?

Options:

A.

tr '(A-Z}' '{a-z}' < testfile > uppercase

B.

echo testfile | tr "[Z-A]" "[z-a]" < testfile > uppercase

C.

cat testfile | tr '{z-a)' '{Z-A}' < testfile > uppercase

D.

tr '[a-z]' '[A-Z]' < testfile > uppercase

Buy Now
Questions 68

An administrator has source code and needs to rebuild a kernel module. Which of the following command sequences is most commonly used to rebuild this

type of module?

Options:

A.

./configure

make

make install

B.

wget

gcc

cp

C.

tar xvzf

build

cp

D.

build

install

configure

Buy Now
Questions 69

Junior system administrator had trouble installing and running an Apache web server on a Linux server. You have been tasked with installing the Apache web server on the Linux server and resolving the issue that prevented the junior administrator from running Apache.

INSTRUCTIONS

Install Apache and start the service. Verify that the Apache service is running with the defaults.

Typing “help” in the terminal will show a list of relevant event commands.

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 69

Options:

Buy Now
Questions 70

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 71

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 71

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 72

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 73

A systems administrator is implementing a new service task with systems at startup and needs to execute a script entitled test.sh with the following content:

XK0-005 Question 73

The administrator tries to run the script after making it executable with chmod +x; however, the script will not run. Which of the following should the administrator do to address this issue? (Choose two.)

Options:

A.

Add #!/bin/bash to the bottom of the script.

B.

Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.

C.

Add #!//bin/bash to the top of the script.

D.

Restart the computer to enable the new service.

E.

Create a unit file for the new service in /etc/init.d with the name helpme.service in the location.

F.

Shut down the computer to enable the new service.

Buy Now
Questions 74

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?

Options:

A.

rebase

B.

tag

C.

commit

D.

push

Buy Now
Questions 75

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 76

A Linux administrator was tasked with deleting all files and directories with names that are contained in the sobelete.txt file. Which of the following commands will accomplish this task?

Options:

A.

xargs -f cat toDelete.txt -rm

B.

rm -d -r -f toDelete.txt

C.

cat toDelete.txt | rm -frd

D.

cat toDelete.txt | xargs rm -rf

Buy Now
Questions 77

Which of the following files holds the system configuration for journal when running systemd?

Options:

A.

/etc/systemd/journald.conf

B.

/etc/systemd/systemd-journalctl.conf

C.

/usr/lib/systemd/journalctl.conf

D.

/etc/systemd/systemd-journald.conf

Buy Now
Questions 78

A Linux administrator is creating a new sudo profile for the accounting user. Which of the following should be added by the administrator to the sudo

configuration file so that the accounting user can run / opt/ acc/ report as root?

Options:

A.

accounting localhost=/opt/acc/report

B.

accounting ALL=/opt/acc/report

C.

%accounting ALL=(ALL) NOPASSWD: /opt/acc/report

D.

accounting /opt/acc/report= (ALL) NOPASSWD: ALL

Buy Now
Questions 79

A Linux administrator generated a list of users who have root-level command-line access to the Linux server to meet an audit requirement. The administrator analyzes the following /etc/passwd and /etc/sudoers files:

$ cat /etc/passwd

root:x: 0:0: :/home/root: /bin/bash

lee: x: 500: 500: :/home/lee:/bin/tcsh

mallory:x: 501:501: :/root:/bin/bash

eve:x: 502: 502: /home/eve:/bin/nologin

carl:x:0:503: :/home/carl:/bin/sh

bob:x: 504: 504: : /home/bob:/bin/ksh

alice:x: 505:505: :/home/alice:/bin/rsh

$ cat /etc/sudoers

Cmnd_Alias SHELLS = /bin/tcsh, /bin/sh, /bin/bash

Cmnd_Alias SYSADMIN = /usr/sbin/tcpdump

ALL = (ALL) ALL

ALL = NOPASSWD: SYSADMIN

Which of the following users, in addition to the root user, should be listed in the audit report as having root-level command-line access? (Select two).

Options:

A.

Carl

B.

Lee

C.

Mallory

D.

Eve

E.

Bob

F.

Alice

Buy Now
Questions 80

A systems administrator wants to back up the directory /data and all its contents to /backup/data on a remote server named remote. Which of the following commands will achieve the desired effect?

Options:

A.

scp -p /data remote:/backup/data

B.

ssh -i /remote:/backup/ /data

C.

rsync -a /data remote:/backup/

D.

cp -r /data /remote/backup/

Buy Now
Questions 81

Which of the following tools is commonly used for creating CI/CD pipelines?

Options:

A.

Chef

B.

Puppet

C.

Jenkins

D.

Ansible

Buy Now
Questions 82

A systems administrator notices the process list on a mission-critical server has a large number of processes that are in state "Z" and marked as "defunct." Which of the following should the administrator do in an attempt to safely remove these entries from the process list?

Options:

A.

Kill the process with PID 1.

B.

Kill the PID of the processes.

C.

Kill the parent PID of the processes.

D.

Reboot the server.

Buy Now
Questions 83

A DevOps engineer wants to allow the same Kubernetes container configurations to be deployed in development, testing, and production environments. A key requirement is that the containers should be configured so that developers do not have to statically configure custom, environment-specific locations. Which of the following should the engineer use to meet this requirement?

Options:

A.

Custom scheduler

B.

Node affinity

C.

Overlay network

D.

Ambassador container

Buy Now
Questions 84

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 84

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 85

A Linux administrator is troubleshooting a memory-related issue. Based on the output of the commands:

XK0-005 Question 85

Which of the following commands would address the issue?

Options:

A.

top -p 8321

B.

kill -9 8321

C.

renice -10 8321

D.

free 8321

Buy Now
Questions 86

Which of the following would significantly help to reduce data loss if more than one drive fails at the same time?

Options:

A.

Server clustering

B.

Load balancing

C.

RAID

D.

VDI

Buy Now
Questions 87

A Linux administrator is configuring a new internal web server fleet. The web servers are up and running but can only be reached by users directly via IP address. The administrator is attempting to fix this inconvenience by requesting appropriate records from the DNS team. The details are:

Hostname: devel.comptia.org

IP address: 5.5.5.1, 5.5.5.2, 5.5.5.3, 5.5.5.4

Name server: 5.5.5.254

Additional names: dev.comptia.org, development.comptia.org

Which of the following types of DNS records should the Linux administrator request from the DNS team? (Select three).

Options:

A.

MX

B.

NS

C.

PTR

D.

A

E.

CNAME

F.

RRSIG

G.

SOA

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

PDF + Testing Engine

$66.4  $165.99

Testing Engine

$46  $114.99
buy now XK0-005 testing engine

PDF (Q&A)

$42  $104.99
buy now XK0-005 pdf