Pass4itsure > CompTIA > CompTIA Certifications > XK0-004 > XK0-004 Online Practice Questions and Answers

XK0-004 Online Practice Questions and Answers

Questions 4

A junior Linux administrator is setting up system-wide configuration settings. The goal is to ensure the PATH environment variable includes the following locations for all users who log into a Linux system:

The administrator issues the following commands at the terminal:

Respectively, the output of these commands is as follows:

Given this output, which of the following would be the BEST action for the administrator to perform to address this issue?

A. Update the /etc/profile.d file using a text editor, navigate to the PATH element, add the missing locations, and run the bash_completion.sh script to update the changes.

B. Update the /etc/profile file using a text editor, navigate to the PATH element, add the missing locations and run the . /etc/profile command to update the changes.

C. Update the /etc/profile.d file using a text editor, navigate to the PATH element, add the missing locations, and reboot to update the changes.

D. Update the /etc/profile file using a text editor navigate to the PATH element, add the missing locations, and restart the bash process to update the changes.

Buy Now
Questions 5

An operator finds a user is having issues with opening certain files.

Which of the following commands would allow the security administrator to list and check the SELinux context?

A. ls -D

B. ls -a

C. ls -Z

D. ls -1

Buy Now
Questions 6

An administrator reviews the following configuration file provided by a DevOps engineer:

Which of the following would the application parsing this file MOST likely have to support?

A. YAML B. AJAX

C. JSON

D. SOAP

Buy Now
Questions 7

A systems administrator is unable to reach other devices on the network and the Internet. The server is configured with the IP address 192.169.1.50/24 on eth0. The server's router is 192.168.1.1. The administrator reviews the output of route -n:

Which of the following commands should the administrator run to correct the issue?

A. route del default gw 192.168.2.1 eth0; route add default gw 192.168.1.1 eth0

B. route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.2.1 eth0

C. route add 192.168.1.1 default 192.168.1.50 eth0

D. route host gw 192.168.1.1 eth0

Buy Now
Questions 8

A technician wants to archive and compress all files and folders contained within the /home/user directory. Which of the following commands should the technician execute?

A. tar xvfz /home/user user.tar.z

B. tar cvfz ./user.tar.gz /home/user

C. tar cvfx user.tar.zip /home/user

D. tar xfvZ user.tar.Z ./home/user

Buy Now
Questions 9

A user creates a key pair to configure RSA authentication on a Linux server. Which of the following should the user do NEXT?

A. Copy the id_rsa.pub file contents to the server

B. Copy the id_rsa file contents to the server

C. Use ssh-add to install the id_rsa.pub on the client

D. Copy the known_hosts file contents to the client

E. Copy the known_hosts file contents to the server

Buy Now
Questions 10

A Linux administrator is developing a Bash script to close specific ports on a server firewall. The administrator is not certain of the default port for the Internet Message Access Protocol. Which of the following files should the administrator check to determine the default port?

A. /etc/network

B. /etc/default/ufw

C. /etc/resolv.conf

D. /etc/services

Buy Now
Questions 11

A user wants to configure the application “myapp” to start on runlevels 2, 3, 4, and 5 every time the system starts. Which of the following commands will accomplish this task?

A. chkconfig --level 2345 myapp on

B. systemctl myapp on 2345

C. chkcinfig myapp --levels 2-5

D. systemctl --levels 2345 on

Buy Now
Questions 12

A systems administrator wants to mount an ISO to access its content. Using /mnt as a mount point, which of the following is the correct syntax?

A. mount -o iso9660 /dev/sr0 /mnt

B. mount -o loop -t iso /mnt

C. mount -o loop /tmp/image.iso /mnt

D. mount -o loop /dev/kvm /mnt

Buy Now
Questions 13

Which of the following is used in unattended server installation via PXE?

A. Kickstart

B. YAML

C. Cloud-init

D. Container image

Buy Now
Exam Code: XK0-004
Exam Name: CompTIA Linux+ Certification
Last Update: Aug 23, 2023
Questions: 516
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99