Spring Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

CompTIA Linux+ Exam

Last Update 12 hours ago Total Questions : 487

The CompTIA Linux+ Exam content is now fully updated, with all current exam questions added 12 hours ago. Deciding to include XK0-005 practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our XK0-005 exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these XK0-005 sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any CompTIA Linux+ Exam practice test comfortably within the allotted time.

Question # 51

A Linux administrator recently downloaded a software package that is currently in a compressed file. Which of the following commands will extract the files?

A.

unzip -v

B.

bzip2 -z

C.

gzip

D.

funzip

Question # 52

After listing the properties of a system account, a systems administrator wants to remove the expiration date of a user account. Which of the following commands will accomplish this task?

A.

chgrp system accountname

B.

passwd –s accountname

C.

chmod -G system account name

D.

chage -E -1 accountname

Question # 53

A DevOps engineer needs to allow incoming traffic to ports in the range of 4000 to 5000 on a Linux server. Which of the following commands will enforce this rule?

A.

iptables -f filter -I INPUT -p tcp --dport 4000:5000 -A ACCEPT

B.

iptables -t filter -A INPUT -p tcp --dport 4000:5000 -j ACCEPT

C.

iptables filter -A INPUT -p tcp --dport 4000:5000 -D ACCEPT

D.

iptables filter -S INPUT -p tcp --dport 4000:5000 -A ACCEPT

Question # 54

A systems administrator made some unapproved changes prior to leaving the company. The newly hired administrator has been tasked with revealing the system to a compliant state. Which of the following commands will list and remove the correspondent packages?

A.

dnf list and dnf remove last

B.

dnf remove and dnf check

C.

dnf info and dnf upgrade

D.

dnf history and dnf history undo last

Question # 55

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?

A.
B.
C.
D.
Question # 56

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:

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.)

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.

Question # 57

An administrator installed an application from source into /opt/operations1/ and has received numerous reports that users are not able to access the application without having to use the full path /opt/operations1/bin/*. Which of the following commands should be used to resolve this issue?

A.

echo ' export PATH=$PATH:/opt/operations1/bin ' > > /etc/profile

B.

echo ' export PATH=/opt/operations1/bin ' > > /etc/profile

C.

echo ' export PATH=$PATH/opt/operations1/bin ' > > /etc/profile

D.

echo ' export $PATH:/opt/operations1/bin ' > > /etc/profile

Question # 58

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?

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

Question # 59

To harden one of the servers, an administrator needs to remove the possibility of remote administrative login via the SSH service. Which of the following should the administrator do?

A.

Add the line DenyUsers root to the /etc/hosts.deny file.

B.

Set PermitRootLogin to no in the /etc/ssh/sshd_config file.

C.

Add the line account required pam_nologin. so to the /etc/pam.d/sshd file.

D.

Set PubKeyAuthentication to no in the /etc/ssh/ssh_config file.

Question # 60

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

Which of the following commands should replace the < CONDITIONAL > string?

A.

if [ -f " $filename " ]; then

B.

if [ -d " $filename " ]; then

C.

if [ -f " $filename " ] then

D.

if [ -f " $filename " ]; while

Go to page: