Leads4pass > CompTIA > CompTIA Certifications > XK0-005 > XK0-005 Online Practice Questions and Answers

XK0-005 Online Practice Questions and Answers

Questions 4

A junior administrator is trying to set up a passwordless SSH connection to one of the servers. The administrator follows the instructions and puts the key in the authorized_key file at the server, but the administrator is still asked to provide a password during the connection.

Given the following output:

Which of the following commands would resolve the issue and allow an SSH connection to be established without a password?

A. restorecon -rv .ssh/authorized_key

B. mv .ssh/authorized_key .ssh/authorized_keys

C. systemct1 restart sshd.service

D. chmod 600 mv .ssh/authorized_key

Buy Now
Questions 5

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?

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 6

A Linux administrator needs to redirect all HTTP traffic temporarily to the new proxy server 192.0.2.25 on port 3128. Which of the following commands will accomplish this task?

A. iptables -t nat -D PREROUTING -p tcp --sport 80 -j DNAT - -to-destination 192.0.2.25:3128

B. iptables -t nat -A PREROUTING -p top --dport 81 -j DNAT -to-destination 192.0.2.25:3129

C. iptables -t nat -I PREROUTING -p top --sport 80 -j DNAT -to-destination 192.0.2.25:3129

D. iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT -to-destination 192.0.2.25:3128

Buy Now
Questions 7

An administrator needs to get network information from a group of statically assigned workstations before they are reconnected to the network. Which of the following should the administrator use to obtain this information?

A. ip show

B. ifcfg --a

C. ifcfg --s

D. i fname --s

Buy Now
Questions 8

A Linux administrator needs to create a new cloud.cpio archive containing all the files from the current directory. Which of the following commands can help to accomplish this task?

A. ls | cpio -iv > cloud.epio

B. ls | cpio -iv < cloud.epio

C. ls | cpio -ov > cloud.cpio

D. ls cpio -ov < cloud.cpio

Buy Now
Questions 9

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?

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 10

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?

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 andand tar cvf -

Buy Now
Questions 11

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

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 12

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

A. chmod 755 filename.log

B. chmod 640 filename.log

C. chmod 740 filename.log

D. chmod 744 filename.log

Buy Now
Questions 13

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?

A. usermod -d /srv/www-data www-data andand usermod -d /var/lib/db db

B. passwd -u www-data andand passwd -u db

C. renice -n 1002 -u 502 andand renice -n 1005 -u 505

D. chsh -s /bin/false www-data andand chsh -s /bin/false db

Buy Now
Exam Code: XK0-005
Exam Name: CompTIA Linux+
Last Update:
Questions: 360
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99