Weekend Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bigdisc65

XK0-005 Exam Dumps - CompTIA Linux+ Questions and Answers

Question # 64

A Linux administrator is tasked with moving files in a database server. The administrator must not overwrite any existing files. Which of the following commands would indicate that the file already exists?

Options:

A.

mv-ifilename/tmp/backup

B.

mv-bfilename/tmp/backup

C.

mv-nfilename/tmp/backup

D.

mv-ffilename/tmp/backup

Buy Now
Question # 65

An administrator needs to allow remote administrative access to a Linux server only to employees who are using the authorized private key. Which of the following options should the administrator set in the SSHD configuration file to achieve the goal?

Options:

A.

AuthorizedKeysCommand sudo

B.

PermitRootLogin prohibit-password

C.

AuthorizedKeysCommandUser root

D.

PasswordAuthentication no

Buy Now
Question # 66

A Linux systems administrator is configuring a new filesystem that needs the capability to be mounted persistently across reboots. Which of the following commands will accomplish this task? (Choose two.)

Options:

A.

df -h /data

B.

mkfs.ext4 /dev/sdc1

C.

fsck /dev/sdc1

D.

fdisk -l /dev/sdc1

E.

echo "/data /dev/sdc1 ext4 defaults 0 0" >> /etc/fstab

F.

echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab

Buy Now
Question # 67

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
Question # 68

A Linux administrator is troubleshooting connectivity issues and receives the following outputs:

python

Copy

$ ping comptia.org

ping: comptia.org: Temporary failure in name resolution

$ ping 104.18.17.29

64 bytes from 104.18.17.29: icmp_seq=1 ttl=63 time=31.4 ms

...

Which of the following describes the issue?

Options:

A.

A DNS has not been configured in the /etc/resolv.conf file

B.

A name server IP address has not been added in the /etc/protocols file

C.

The network interface is disabled

D.

A gateway IP address has not been configured on the network interface's configuration file

Buy Now
Question # 69

A systems administrator wants to ensure all the latest patches and updates are automatically synced to the local repository every two hours on Sundays through Tuesdays in the month of May. Which of the following cron entries can the administrator use to achieve this goal? (Select two.)

Options:

A.

0 */2 * 5 0-3 /root/update-from-remote-to-local.sh

B.

0 0,2,4,6,8,10,12,14 * 5 0-2 /root/update-from-remote-to-local.sh

C.

0 0,2,4,6,8,10,12,14 * 5 0-3 /root/update-from-remote-to-local.sh

D.

0 0-23/2 * 5 0-3 /root/update-from-remote-to-local.sh

E.

0 0-23/2 * 5 0-2 /root/update-from-remote-to-local.sh

F.

0 */2 * 5 0-2 /root/update-from-remote-to-local.sh

Buy Now
Question # 70

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
Question # 71

A Linux administrator needs to rebuild a container with the httpd service in order to change some default parameters. Which of the following should be the first command line in the Dockerfile?

Options:

A.

FROM httpd

B.

BASE httpd

C.

USE httpd

D.

INHERIT httpd

Buy Now
Question # 72

A systems administrator is gathering information about a file type and the contents of a file. Which of the following commands should the administrator use to accomplish this task?

Options:

A.

file filename

B.

touch filename

C.

grep filename

D.

lsof filename

Buy Now
Question # 73

Which of the following is a way to enable a production web server's communications with strong encryption and identity verification?

Options:

A.

Creating a key pair using ssh-keygen and using the generated key pair to secure the HTTPS communication

B.

Creating a private key locally using openssl, creating a certificate request, sending the request to an external certification provider, and using the provided certificate for HTTPS communication

C.

Creating a 4096-bytes or longer self-signed certificate using openssl and using it to secure HTTPS communication

D.

Creating a secret file using /dev/random as a source and using the generated file for HTTPS communication

Buy Now
Exam Code: XK0-005
Exam Name: CompTIA Linux+ Exam
Last Update: Jun 14, 2025
Questions: 470
XK0-005 pdf

XK0-005 PDF

$29.75  $84.99
XK0-005 Engine

XK0-005 Testing Engine

$33.25  $94.99
XK0-005 PDF + Engine

XK0-005 PDF + Testing Engine

$47.25  $134.99