Summer Sale - Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dpt65

XK0-004 Questions and Answers

Note! Following XK0-004 Exam is Retired now. Please select the alternative replacement for your Exam Certification. The new exam code is XK0-005

XK0-004 Questions and Answers

Question # 6

Which of the following is the BEST reason for not storing database files in the /var directory?

A.

The /var filesystem is not fast enough for database files.

B.

The number of files in /var is limited by the available inodes.

C.

Files in /var do not have strict file permissions.

D.

If log files fill up /var, it might corrupt the database.

Full Access
Question # 7

A configuration management tool running every minute is enforcing the service HTTPd to be started. To

perform maintenance, which of the following series of commands can be used to prevent the service from

being started?

A.

systemctl stop httpd && systemctl mask httpd

B.

systemctl disable httpd && systemctl mask httpd

C.

systemctl stop httpd && systemctl hide httpd

D.

systemctl disable httpd && systemctl hide httpd

Full Access
Question # 8

An analyst is trying to determine which public IP addresses are managed by Company A, but the script is not working correctly.

Which of the following explains what is wrong with the script?

A.

$(cat ip-list.txt) should be changed to `cat ip-list.txt` in the for statement.

B.

The for should be changed to while in the loop.

C.

The > should be changed to 2> in the do statement.

D.

The -ne flag should be changed to -eq in the if statement.

Full Access
Question # 9

An administrator receives a USB drive and wants to make an exact copy of the disk before starting to work on it. One of the partitions on the USB drive was mounted as /dev/sdc1.

Which of the following commands should the administrator use?

A.

dd if=/dev/sdc of=~/usb_copy.img bs=512

B.

dd if=/dev/sdc1 of=~/usb_copy.img count=1024

C.

dd if=/dev/sdc1 of=~/usb_copy.img bs=1024

D.

dd of=/dev/sdc if=~/usb_copy.img bs=1M

Full Access
Question # 10

Which of the following directories contains information related to various runtime processes, such as hardware and system memory?

A.

/Usr/bin

B.

/Opt

C.

/Proc

D.

/etc/local/

Full Access
Question # 11

A Linux administrator is configuring a web server that connects to an external SQL database. However, after starting the web application, the logs are showing an error message:

Which of the following is the BEST way to resolve this issue?

A.

echo 0 > seLinux/enforce

B.

restorecon -rv /var/www/ html

C.

sed -1 s/'SELINUX. */SELINUX’’permissive// etc/selinux/config

D.

setseboo1 -p http-can-network_connect_db 1

Full Access
Question # 12

A remote server reverts to the incorrect time when it is restarted. Which of the following will save the correct time to the BIOS clock once the time and date have been set on the server?

A.

btime -- settime

B.

btime -- setdate

C.

hwclock -- systohc

D.

date -- setclock

Full Access
Question # 13

An administrator needs to see the type of CPU that a server is running. Which of the following files contains this information?

A.

/proc/cpuinfo

B.

/etc/devices/info.conf

C.

/dev/proc/cpu

D.

/sys/dev/cpuinfo

Full Access
Question # 14

A Linux administrator needs to schedule a cron job to run at 1:15 p.m. every Friday to report the amount of free disk space on the system and to send the output to a file named “freespace”. Which of the following would meet this requirement?

A.

13 15 * * 5 df > /freespace

B.

15 13 * * 5 df > /freespace

C.

15 1 * * 6 df > /freespace

D.

15 13 6 * * df > /freespace

Full Access
Question # 15

An administrator needs to allow additional specific users and groups to have access to a foWer without removing the original owner or group. Which of the following commands should the administrator use to complete this task?

A.

sentenforce

B.

setfac1

C.

chmod

D.

chown

Full Access
Question # 16

An administrator is investigating issues with an unresponsive website hosted on an internal web server named websrv. After gathering diagnostics data the administrator performs the following analysis:

Which of the following would MOST likely resolve the issue on the web server?

A.

Systemct1 restart httpd

B.

Ifup etho

C.

Iptables –I INPUT 1 –p tcp –dport 80 –j ACCETP

D.

Route add default gw 10.0.112.0eth0

Full Access
Question # 17

An administrator schedules downtime on a system to find out why it takes so long to boot. Which of the following commands will help the administrator determine the issue with this system?

A.

systemd-analyze blame

B.

syated-analyze time

C.

systemct1 status unit-files

D.

systemct1 mask start

Full Access
Question # 18

A systems administrator needs to allow the Linux server to receive HTTP connections from Internet hosts. By default, the port for HTTP connections is blocked. Which of the following rules should be added in the firewall to allow this type of connection?

A.

firewall-cmd --zone=public --add-port=443/tcp --permanent

B.

firewall-cmd --zone=internal --add-port=80/tcp --permanent

C.

firewall-cmd --zone=public --add-port=80/tcp --permanent

D.

firewall-cmd --zone=internal --add-port=443/tcp --permanent

Full Access
Question # 19

Which of the following server roles is MOST appropriate to route files to multifunction devices?

A.

Proxy

B.

Router

C.

Print server

D.

Web server

Full Access
Question # 20

An administrator wants to add a user named comptia to the system administrators group. Which of the following commands will accomplish this task?

A.

Usermod –sG wheel comptia

B.

Useradd -sG wheel comptia

C.

visudo -sG wheel comptia

D.

sudo -sG wheel comptia

Full Access
Question # 21

A technician recently installed Linux on a desktop computer. The desktop has two graphics cards from two different vendors. One of the graphics cards works, but the other does not. Which of the following commands should the technician use to start troubleshooting this issue?

A.

Ismod

B.

Vmstat

C.

Gdm

D.

startx

Full Access
Question # 22

A Linux administrator has downloaded and installed the httpd package.

Which of the following commands will start the service immediately and allow the service to start on system boot?

A.

systemctl start httpd;chkconfig httpd on

B.

systemctl status httpd;chkconfig httpd on

C.

systemctl.start httpd;chkconfig httpd on

D.

systemctl start httpd;chkconfig httpd on 6

Full Access
Question # 23

A systems administrator notices several intensive tasks executing from users Joe and Ann. These processes

are impacting server operations but must be allowed to continue running.

Which of the following commands should the systems administrator run to reduce the impact on the server?

A.

pkill -u joe ann

B.

renice 11 -u joe ann

C.

nohup -u joe ann

D.

strace -u joe ann

Full Access
Question # 24

Some Bash scripts arc being versioned and stored in a Git repository Which of the following commands should the Linux administrator use to exclude tmp Wes from being added to the repository during any code adds and commits?

A.

export GIT_IGNORE=,tmp

B.

alias git=git commit --ignore=, tmp

C.

echo .gitignore >> * tmp

D.

git config -- blacklist = tmp

Full Access
Question # 25

A technician wants to create a set of directories named dir9 and change their permissions so only the owner can manage their content. Which of the following scripts will accomplish this task?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 26

An administrator is using a configuration management tool to define a system’s configuration. The defined configuration can be used to provision new systems, rebuild existing systems, or roll back systems

to their original baseline configurations.

Which of the following BEST describes what the administrator is doing?

A.

Build automation

B.

Containerization

C.

Infrastructure as code

D.

Test automation

Full Access
Question # 27

Which of the following would be used to check a sensor input to a Linux system?

A.

GPIO

B.

HBA

C.

SCSI

D.

SATA

Full Access
Question # 28

While booting an Intel 64-bit Debian UEFI desktop from power up, the prompt ts0> was displayed, indicating the bootloader failed. Which of the following will complete the boot process to a GRUB2 menu?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 29

A Linux administrator needs to schedule a backup job to run every Friday at 2 15 a.m. Which of the following lines should the administrator add to the crontab file?

A.

15 2 * * 5 /bin/backup_job.sh

B.

2 15 * * 5 /bin/backup_job.sh

C.

2 * * 15 5 /bin/backup_job.sh

D.

2 * 5 15 * /bin/backup_job.sh

Full Access
Question # 30

A virtual machine logs al limes using UTC The systems administrator would like to have one script that outputs times that are in the Amenca/Chicago time zone. Which of the following would the administrator MOST likely use in the script to accounts.

A.

echo 'env TZ=America/Chicago date' >> mylog.-xt

B.

hwclock --localtime » -mylog.txt

C.

date -d 'Tz="America/Chicago" now’ >> mylog.txt

D.

timedatect1 set-timezone "America/Chicago" $$ date >> mylog.txt

Full Access
Question # 31

Which of the following commands will verify the size of a swap partition? (Seled TWO).

A.

lsscsi

B.

cat /proc/meminfo

C.

cat /proc/icports

D.

lausb

E.

lscpu

F.

lablk

Full Access
Question # 32

A systems administrator is reviewing the following partial output:

Which of the following should the administrator use to find contact information for the connections?

A.

tcpdump -Invi eth0 host 180.20.210.98 and pore 80

B.

whois $(dig -x 180.20.210.98 +short)

C.

nslookup -query MX 180.20.210.98

D.

tracert, -d 180.20.210.98

E.

host 180.20.210.98 I sendmail

Full Access
Question # 33

Which of the following will MOST likely fix the issue?

A.

Add more CPUs to the server

B.

Replace the network cable

C.

Add a second web server and a load balancer

D.

Add more RAM to the server

E.

Exclude the web root directory from antivirus scanning

Full Access
Question # 34

An administrator is reviewing suspicious activity on a server and needs to determine which users logged into

the system within the past 24 hours. Which of the following commands should the administrator run to

determine this?

A.

last

B.

who

C.

id

D.

usermod

Full Access
Question # 35

A user wants to alias dir so it always returns the contents of the ls -la command. However, the user has to

reset the alias with every login.

Which of the following is the BEST action the user can take to ensure the command is always available?

A.

echo "alias dir=ls -la" > /etc/profile

B.

echo "alias dir=ls -la" >> /etc/skel

C.

echo "alias dir=ls -la" >> ~/.profile

D.

echo "alias dir=ls -la" > ~/.bashrc

Full Access
Question # 36

A Linux administrator needs to configure a new firewall without an existing ACL to allow incoming web traffic.

The firewall must log the allowed network traffic. Which of the following command sequences would

accomplish this task when they are executed in order?

A.

iptables –A INPUT –p tcp --dport 80 –J LOG

iptables –A INPUT –p tcp --dport 443 –J LOG

iptables –I INPUT –p tcp --dport 80 –J ACCEPT

iptables –I INPUT –p tcp --dport 443 –J ACCEPT

B.

iptables –I INPUT –m multiport –p tcp --dports 80,443 –J LOG

iptables –I INPUT –m multiport –p tcp --dports 80,443 –J ACCEPT

C.

iptables –A INPUT –m multiport –p tcp --dports 80,443 –J LOG

iptables –A INPUT –m multiport –p tcp --dports 80,443 –J ACCEPT

D.

iptables –A INPUT –p tcp --dport 80 –J ACCEPT

iptables –A INPUT –p tcp --dport 443 –J ACCEPT

iptables –A INPUT –p tcp --dport 80 –J LOG

iptables –A INPUT –p tcp --dport 443 –J LOG

Full Access
Question # 37

A developer has contacted a systems administrator because an application is not receiving a response from the client. The application must purge the message queue before terminating. Which of the following should the systems administrator perform in order to BEST address the issue?

A.

Send the SIGHUP signal with the kill command.

B.

Send the signal with the command.

C.

Send the SIGSTOP signal with the kill command.

D.

Send the SIGTERN signal with the kill command.

Full Access
Question # 38

A Linux administrator is restoring the SELinux contexts on an entire system. Which of the following commands

is the BEST option to complete this task?

A.

setenforce 0 && reboot

B.

setfacl –bR / && reboot

C.

touch /.autorelabel && reboot

D.

restorecon / && reboot

Full Access
Question # 39

A user, jsmith, needs access to database files located on a server. Which of the following will add jsmith to the “dba” group and preserve existing group memberships?

A.

usermod –a –G dba jsmith

B.

usermod –g dba jsmith

C.

useradd –g dba jsmith

D.

groupmod dba –u jsmith

Full Access
Question # 40

An administrator uses a tool to perform roiling deployments when the production application needs to be updated. The tool temporarily removes 10% of the systems from the load balancer at a time and it pushes the newest version of the application to each system. If there are errors the tool rolls back the changes. Which of the following does this scenario BEST describe?

A.

infrastructure as code

B.

Infrastructure automation

C.

Agent-based architecture

D.

Buid automation

E.

inventory management

Full Access
Question # 41

As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following:

Add relevant content to /tmp/script.sh, so that it finds and compresses rotated files in /var/log without recursion.

INSTRUCTIONS

Fill the blanks to build a script that performs the actual compression of rotated log files.

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

Full Access
Question # 42

A Linux administrator needs to take stock of USB devices attached to the system.

Which of the following commands would be BEST to complete this task?

A.

lspci

B.

lsusb

C.

cat /proc/USB

D.

modprobe -–usb

Full Access
Question # 43

A junior administrator of a physical server receives log messages indicating the out-of-memory killer has been active. All memory slots are in use on the motherboard, but additional disk space is available. Space has been allocated for a swap file.

Which of the following should the administrator use to reduce the output of memory messages?

A.

free : swapoff / swapfile ; swapon -a

B.

mkswap /swapfile; swapon –a

C.

fallocate –l 2G /swapfile && swapon –a

D.

echo “1” > /proc/meninfo ; swapon / swapfile

Full Access
Question # 44

A user has connected a Bluetooth mouse to a computer, but it is not working properly. Which of the following commands should the systems administrator use to fix the issue?

A.

lsmod –i bluetooth

B.

insmod bluetooth

C.

modprobe –r bluetooth

D.

depmod –i bluetooth

Full Access
Question # 45

A Bash script is saving the following list of users from the home directory to a variable:

User=’’home/matt home/tom home/john home/mike’’.

Which of the following commands creates a list of only the usernames?

A.

Users='' (sed -r 's/home///g' <<< $Users)''

B.

Users=$ (sed -r 's?|home/||'<<< $Users)

C.

Users=$(Users//home\ /)

D.

Users='sed -r 's/home\ ///g' <<< $users'

Full Access
Question # 46

Which of the following server roles would MOST likely be found in a PXE boot environment?

A.

Web

B.

DNS

C.

Proxy

D.

DCCP

Full Access
Question # 47

An administrator is provisioning and attaching a secondary disk to a Linux server as a data drive. Which Of the following commands the administrator use to find the UUID Of the disk so the drive can be mounted upon boot?

A.

blkid

B.

isblk

C.

2label

D.

fstab

Full Access
Question # 48

When logging in, an administrator must use a temporary six-digit code that is displayed on a key fob.

Which of the following has been implemented?

A.

Biometrics

B.

HOTP

C.

PKI

D.

Software token

Full Access
Question # 49

A systems administrator wants to verify the DNS information of a system that is in production.

Which of the following will provide this information?

A.

nmap -R 10.10.20.21 10.10.1.10

B.

whois -r -h 10.10.1.10 10.10.20.21

C.

dig -x 10.10.20.21 @10.10.1.10

D.

route 10.10.20.21 gw 10.10.1.10

Full Access
Question # 50

A user attempts to use the mount -a command but gets the following error:

mount: mount point /mnt/test does not exist

Which of the following commands best describes the action the Linux administrator should take NEXT?

A.

mount –a /mnt/test

B.

mkdir –p /mnt/test

C.

mdadm –p /mnt/test

D.

mkfs /mnt/test

E.

touch /mnt/test

Full Access
Question # 51

Which of the following command should an administrator use to prevent users from starting the httpd service on a system-based Linux system?

A.

Systemct1 mask httpd

B.

Systemct1 disables httpd

C.

Chkconfig httpd off

D.

Systemctl stop httpd

Full Access
Question # 52

A user cannot write files to the /home/user directory. The junior Linux administrator runs the following commands:

Which of the following BEST represents why the user cannot write files?

A.

The filesystem is out of inodes.

B.

The filesystem is out of file space.

C.

The filesystem is not configured for the user to write to it.

D.

The filesystem does not have a group write permission.

Full Access
Question # 53

Which of the following commands will let a Linux user know the PCI devices that are installed in the system?

A.

cat /proc/devices/pci

B.

lspci

C.

lsdev

D.

cat /proc/sys/dev

Full Access
Question # 54

A junior systems administrator needs to make a packet capture file that will only capture HTTP protocol data to a file called test.pcap.

Which of the following commands would allow the administrator to accomplish this task?

A.

netcat -p 80 -w test.pcap

B.

tshark -r test.pcap -o http

C.

tcpdump -i eth0 port 80 -r test.pcap

D.

tcpdump -i eth0 port 80 -w test.pcap

Full Access
Question # 55

Due to security policies, a restriction was implemented that forbids direct access to the database server. The

junior administrator needs to connect using SSH tunneling. Which of the following commands allows the junior

administrator to connect from a desktop?

A.

ssh –L dbserver.local:5432:localhost:95432 postgres@dbserver.local

B.

ssh –L 5432:localhost dbserver.local:5432 postgres

C.

ssh –L 95432:localhost postgres@dbserver.local

D.

ssh –L 9432:localhost:5432 postgres@dbserver.local

Full Access
Question # 56

An administrator receives an alarm because the disk of one of the sewers is running out of space. Which of the

following commands can be used to see the space that each partition is using?

A.

df -h

B.

du -scg /

C.

fdisk -l

D.

fsck /

Full Access
Question # 57

A systems administrator copied the latest archive Of the corporate application, corpapp.tar.gz, to a new server. The backup software lists the following entry in the log file:

Which of the following should the administrator run to verify the archive copied correctly without corruption?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 58

A systems administrator wants to check the log of changes made to a Git repository. Which of the following commands can be used for this task?

A.

git commit log

B.

git branch list

C.

git reflog

D.

git push log

Full Access
Question # 59

The following error is encountered when running a script:

Which of the following is the cause of this error?

A.

Script.sh was not added to the PATH

B.

The $ ! line is incorrect

C.

Script.sh is missing the executable bit.

D.

The file script. sh does not exist.

E.

Bash is not installed on the system

Full Access
Question # 60

A junior systems administrator is scanning archive.tar files with an antivirus scanner. The administrator is given the following tasks:

  • List all files that are in the archive.tar files.
  • Extract all files from the archive.tar files.

Which of the following actions should be performed to meet these requirements? (Choose two.)

A.

tar -tvf archive.tar

B.

tar -xf archive.tar

C.

tar -A archive.tar

D.

tar -av archive.tar

E.

tar -r archive.tar

F.

tar -uvz archive.tar

Full Access
Question # 61

A Linux administrator built a GitLab server. Later that day, a software engineer tried to access the server to upload the repository during the final step of installation. The software engineer could not access the website. Which of the following firewall rules would allow access to this site?

A.

iptables –A INPUT –p tcp –m multiport --dports 80,443 –m conntrack –cstate NEW, ESTABLISHED –j ACCEPT

B.

iptables –A INPUT –p tcp –m multiport --dports 80,443 –m conntrack –cstate ESTABLISHED –j ACCEPT

C.

iptables –A INPUT –p tcp –m multiport --dports 80,443 –m conntrack –cstate RELATED, ESTABLISHED –j ACCEPT

D.

iptables –A INPUT –p tcp –m multiport --dports 80,443 –m conntrack –cstate NEW, ESTABLISHED –j REJECT

Full Access
Question # 62

A junior administrator is installing kernel modules. The administrator is given a checklist that outlines the

following tasks to be completed:

Display currently installed module version.

Display which modules loaded at startup.

Which of the following commands would be used to accomplish these tasks? (Choose two.)

A.

cat /etc/issue

B.

insmod

C.

lsmod

D.

rmmod

E.

depmod

F.

dmesg

Full Access
Question # 63

A systems administrator must clean up all application files in the directory /var/log/app. However, the company’s security policy requires the files to be kept on the backup server for one year. The Linux server has only the tar and bzip2 packages installed.

Which of the following commands will package and compress the files?

A.

tar –zcvf applicationfiles.tar.bz2 /var/log/app/*

B.

tar –jcvf applicationfiles.tar.bz2 /var/log/app/*

C.

tar –cvf applicationfiles.tar.bz2 /var/log/app/*

D.

tar –xvf applicationfiles.tar.bz2 /var/log/app/*

Full Access
Question # 64

A user does not want Bluetooth to start up event time the system starts. Which of the following commands should the user execute to accomplish this task?

A.

systemctl disabled bluetcc-h.service

B.

systemctl disable bluetccth.service

C.

systemctl stop bluetooth.service

D.

systemctl stepped bluetccth.service

Full Access
Question # 65

Which of the following commands allow an administrator to determine if the current system is a virtual machine?

A.

lspci

B.

mdadm

C.

vmstat

D.

vgdisplay

Full Access
Question # 66

An administrator is utilizing an automation engine than uses SSH to run commands on remote systems. Which of the fctowng does this describe?

A.

Inventory

B.

Agentless archrtecture

C.

Build automation

D.

Version control

Full Access
Question # 67

A systems administrator is attempting to access a server by SSH. The Linux administrator ensures that the SSH keys on the remote server were unable to connect. The following error message is being displayed:

Which of the following needs to be changed on order for the administrator to access the server via SSH?

A.

Password

B.

SSL

C.

SELinux

D.

OpenSSH

Full Access
Question # 68

A Linux administrator issues the following command with root or sudo privileges:

Rmp -1 installpackage.rpm --nodeps

Which of the following should the administrator expect to see in the output?

A.

The installpackage.rmp package will not fail due to checks for dependencies.

B.

The installpackage.rmp package will not fail due to missing dependencies

C.

The installpackage.rmp package will not be installed, and there will be dependencies

D.

The installpackage.rmp package will not be installed, and there not be check for dependencies

Full Access
Question # 69

A system administrator is setting up a cron job that will copy thousands files from a remote directory on a scheduled basic. The file contents should retain their original permissions, including and group ownership, and the cron job should run for the least amount of the possible. Which of the following is the BEST program to use in this situation?

A.

Rsync

B.

Curl

C.

Scp

D.

Wget

E.

sftp

Full Access
Question # 70

A new web server was recenly installed and configured according to vendor.......... management via SSH has shown slow screen responses. The systems administrator..

An administrator is setting up a script named script,sh to be executed daily at 3:15 a.m. Which of the following is the correct way to define this in crontab?

A.

* * * 15 3 script,sh

B.

3 15 * * * script,sh

C.

* * * 3 15 script,sh

D.

15 3 * * * script,sh

Full Access
Question # 71

A new packages repository named repo10 has been installed on mirror site. A Linux administrator wants to use this new repository for local package installations. In which of the following locations should the administrator store the configuration information for the repo10 repository?

A.

/etc/yum.reps.d/repo10.Repo

B.

/etc/yum_repo.d/repo10

C.

/etc/yum.reps.d/repo10

D.

/etc/yum.conf

Full Access
Question # 72

A Linux administrator needs to remotely update the contents of the www.comptia.org/contacts URL.

Which of the following commands would allow the administrator to download the current contents of the URL before updating?

A.

curl www.comptia.org/contacts

B.

dig www.comptia.org/contacts

C.

apt-get www.comptia.org/contacts

D.

yum list www.comptia.org/contacts

Full Access