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

XK0-005 Online Practice Questions and Answers

Questions 4

A user reported issues when trying to log in to a Linux server. The following outputs were received:

Given the outputs above. which of the following is the reason the user is una-ble to log in to the server?

A. User1 needs to set a long password.

B. User1 is in the incorrect group.

C. The user1 shell assignment incorrect.

D. The user1 password is expired.

Browse 360 Q&As
Questions 5

A systems administrator wants to permit access temporarily to an application running on port 1234/TCP on a Linux server. Which of the following commands will permit this traffic?

A. firewall-cmd --new-service=1234/tcp

B. firewall-cmd --service=1234 --protocol=tcp

C. firewall-cmd --add--port=1234/tcp

D. firewall-cmd --add-whitelist-uid=1234

Browse 360 Q&As
Questions 6

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?

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

Browse 360 Q&As
Questions 7

A Linux systems administrator needs to copy files and directories from Server A to Server B.

Which of the following commands can be used for this purpose? (Select TWO)

A. rsyslog

B. cp

C. rsync

D. reposync

E. scp

F. ssh

Browse 360 Q&As
Questions 8

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?

A. ssh -X user@server application

B. ssh -y user@server application

C. ssh user@server application

D. ssh -D user@server application

Browse 360 Q&As
Questions 9

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

Browse 360 Q&As
Questions 10

A systems administrator checked out the code from the repository, created a new branch, made changes to the code, and then updated the main branch. The systems administrator wants to ensure that the Terraform state files do not appear in the main branch. Which of following should the administrator use to meet this requirement?

A. clone

B. gitxgnore

C. get

D. .ssh

Browse 360 Q&As
Questions 11

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?

A. Ansible

B. git clone

C. git pull

D. terraform plan

Browse 360 Q&As
Questions 12

A Linux system is failing to boot with the following error: Which of the following actions will resolve this issue? (Choose two.)

A. Execute grub-install --root-directory=/mnt and reboot.

B. Execute grub-install /dev/sdX and reboot.

C. Interrupt the boot process in the GRUB menu and add rescue to the kernel line.

D. Fix the partition modifying /etc/default/grub and reboot.

E. Interrupt the boot process in the GRUB menu and add single to the kernel line.

F. Boot the system on a LiveCD/ISO.

Browse 360 Q&As
Questions 13

A Linux administrator is creating a primary partition on the replacement hard drive for an application server. Which of the following commands should the administrator issue to verify the device name of this partition?

A. sudo fdisk /dev/sda

B. sudo fdisk -s /dev/sda

C. sudo fdisk -l

D. sudo fdisk -h

Browse 360 Q&As
Questions 14

A Linux system is having issues. Given the following outputs:

# dig @192.168.2.2 mycomptiahost

; << >> DiG 9.9.4-RedHat-9.9.4-74.el7_6.1 << >> @192.168.2.2 mycomptiahost

; (1 server found)

;; global options: +cmd

;; connection timed out; no servers could be reached

# nc -v 192.168.2.2 53

Ncat: Version 7.70 ( https://nmap.org/ncat )

Ncat: Connection timed out.

# ping 192.168.2.2

PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.

64 bytes from 192.168.2.2: icmp_seq=1 ttl=117 time=4.94 ms

64 bytes from 192.168.2.2: icmp_seq=2 ttl=117 time=10.5 ms

Which of the following best describes this issue?

A. The DNS host is down.

B. The name mycomptiahost does not exist in the DNS.

C. The Linux engineer is using the wrong DNS port.

D. The DNS service is currently not available or the corresponding port is blocked.

Browse 360 Q&As
Questions 15

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

Browse 360 Q&As
Questions 16

A systems administrator is checking the system logs. The administrator wants to look at the last 20 lines of a log. Which of the following will execute the command?

A. tail -v 20

B. tail -n 20

C. tail -c 20

D. tail -l 20

Browse 360 Q&As
Questions 17

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?

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.

Browse 360 Q&As
Questions 18

DRAG DROP

You have been asked to parse a log file of logins to determine various information about who is logging in and when.

INSTRUCTIONS

Open and inspect the Login log file.

Drag and drop the correct commands onto the output that was generated from that

command.

Tokens can be used only once and not all will be used.

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

Select and Place:

Browse 360 Q&As
Exam Code: XK0-005
Exam Name: CompTIA Linux+
Last Update: Mar 19, 2025
Questions: 360 Q&As

PDF

$49.99

VCE

$55.99

PDF + VCE

$65.99