Certbus > CompTIA > CompTIA Linux+ > XK0-004 > XK0-004 Online Practice Questions and Answers

XK0-004 Online Practice Questions and Answers

Questions 4

HOTSPOT

After installing a new web server, you are unable to browse to the default web page.

INSTRUCTIONS

Review all the command output and select the command needed to remediate the issue.

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

Hot Area:

Browse 516 Q&As
Questions 5

A networked has been crashing intermittently. A Linux administrator would like to write a shell script that will attempt to ping the server and email an alert if the server fails to respond. The script will later be scheduled via cron job.

Which of the following scripts would BEST accomplish this task?

A. Option A

B. Option B

C. Option C

D. Option D

Browse 516 Q&As
Questions 6

A Linux administrator is testing a new web application on a local laptop and consistently shows the following 403 errors in the laptop's logs:

The web server starts properly, but an error is generated in the audit log. Which of the following settings should be enabled to prevent this audit message?

A. httpd_can_network_connect = 1

B. httpd_enable_scripting = 1

C. httpd_enable_homedirs = 1

D. httpd_enable_cgi = 1

Browse 516 Q&As
Questions 7

A technician's laptop is configured with wired and wireless interfaces. Both interfaces have obtained the appropriate IP address from the organization's DHCP server.

Which of the following commands is MOST appropriate to remove the IP address from the wireless interface temporarily so network traffic is routed through the wired interface?

A. ip addr wlan0 del default

B. route delete default gw if wlan0

C. netstat -r wlan0

D. dhclient -r wlan0

Browse 516 Q&As
Questions 8

A storage administrator added a new primary partition to a drive and wants to create a filesystem without rebooting. Which of the following commands will allow this to happen?

A. fdisk

B. fsck2

C. partprobe

D. parted

Browse 516 Q&As
Questions 9

A Linux administrator is troubleshooting an issue with a shell script. Users in the accounting department are unable to run the script, but users in the sales department are not having issues. Users in both departments should be able to run the

script. The administrator checks the permissions on the script and receives the following information:

-r-xr-xr-- joe sales script.sh

Which of the following commands should the administrator execute to resolve the problem?

A. chgrp accounting script.sh

B. chmod 644 script.sh

C. chown accounting script.sh

D. chmod a+x script.sh

Browse 516 Q&As
Questions 10

Which of the following commands would a junior systems administrator run to monitor network traffic actively?

A. netstat

B. nmap

C. ping

D. tcpdump

Browse 516 Q&As
Questions 11

A senior systems administrator wants to standardize the commands used in the department and update documentation for junior Linux administrators for using systemd. Which of the following commands replaces the old command service named stop?

A. systemctl kill named

B. systemctl stop named

C. systemctl named stop

D. systemctl named kill

Browse 516 Q&As
Questions 12

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

Browse 516 Q&As
Questions 13

An administrator needs to change the DNS domain search order of a single Linux host to localize it better. Which of the following files should the administrator edit?

A. /etc/resolv.conf

B. /etc/hosts

C. /etc/nsswitch.conf

D. /etc/dhcpd.conf

Browse 516 Q&As
Questions 14

An administrator needs to kill the oldest Bash shell running in the system. Which of the following commands should be issued to accomplish this task?

A. ps axjf | grep bash to obtain PID kill -9 PID

B. ps -eo pid,etime,cmd | grep bash (to obtain PID) kill -9 PID

C. ps -eo pid,etime| grep bash (to obtain PID) killall -9 PID

D. killall -15 -o bash

Browse 516 Q&As
Questions 15

A systems administrator is receiving errors while trying to install a popular virtualization software. The software specifications state the processor needs to support virtualization with Intel instructions. Additional requirements state the processor must accelerate encryption/decryption and use hyperthreading. Given the following output about the processor:

fpu ume depse tsu msr pae mce cx8 apic sep mtrr pae mca cmov pat pse36 cflusm mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt aes xsave avx rdrand hypervisor lahf_lm fsgsbase

Which of the following is the MOST likely reason for the errors?

A. The processor supports AMD instructions rather than Intel.

B. The processor cannot accelerate decryption.

C. The processor does not support hyperthreading.

D. The processor is running inside a virtual machine.

Browse 516 Q&As
Questions 16

A Linux administrator needs to back up files from a user's home directory to a remote server. The administrator copied the files last week but must ensure any files created or modified since then are added.

Which of the following is the BEST command for the administrator to use?

A. scp -r /home/user99/* [email protected]:/backups/user99/

B. rsync -r /home/user99 [email protected]:/backups

C. cp -rf /home/user99/* /mnt/backups/user99/

D. sftp -b /home/user99/* [email protected]:/backups

Browse 516 Q&As
Questions 17

A systems administrator documents the instructions on the internal wiki regarding how to turn the company's code into Debian packages. The instructions include the commands used to compile, what tests need to be run, the commands to convert the raw code into a package that apt or dpkg can manage, as well as an explanation of each command.

Which of the following is this an example of?

A. Infrastructure as code

B. Attributes

C. Procedures

D. Configuration management

Browse 516 Q&As
Questions 18

A systems administrator manually added a new library to the server. The administrator wants to rebuild the library cache for immediate use. Which of the following commands should the systems administrator run to achieve this goal?

A. make install

B. ldconfig

C. make

D. ldd

Browse 516 Q&As
Exam Code: XK0-004
Exam Name: CompTIA Linux+ Certification Exam
Last Update: Aug 23, 2023
Questions: 516 Q&As

PDF

$45.99

VCE

$49.99

PDF + VCE

$59.99