Full XK0-004 Practice Test and 266 unique questions with explanations waiting just for you!
Linux+ Dumps XK0-004 Exam for Full Questions - Exam Study Guide
NEW QUESTION 156
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. The >should be changed to 2>in the dostatement.
- B. $(cat ip-list.txt)should be changed to `cat ip-list.txt`in the forstatement.
- C. The -neflag should be changed to -eqin the ifstatement.
- D. The forshould be changed to whilein the loop.
Answer: B
NEW QUESTION 157
Given the output below:
Which of the following commands can be used to remove MyPhoto.jpg from the current directory?
- A. del Pictures/photo.jpg
- B. rm -f MyPhoto.jpg
- C. ln -rm ./Pictures/photo.jpg
- D. rm -rf ./Pictures
- E. unlink ./MyPhoto.jpg
Answer: C
NEW QUESTION 158
A junior systems administrator is creating a cron job. The cron job requirements are as follows:
Run the hello.sh script every hour (24 times in one day).
Run it on Monday only.
Given this scenario, which of the following crontab options should be configured to meet these requirements?
- A. 1 *** 0 hello.sh
- B. 0 *** 1 hello.sh
- C. 0 24 ** Monday hello.sh
- D. 24 *** Monday hello.sh
Answer: D
Explanation:
Reference:
https://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html
NEW QUESTION 159
A Linux administrator installed a new network adapter and temporarily disabled the network service from starting on boot. The partial output of chkconfig is as follows:
Which of the following commands BEST describes how the administrator should re-enable the network service?
- A. chkconfig --level 345 network on
- B. chkconfig --level 0-6 network on
- C. chkconfig --level 12 network on
- D. chkconfig --level 0 network on
- E. chkconfig --level 6 network on
Answer: A
NEW QUESTION 160
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 host gw 192.168.1.1 eth0
- C. route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.2.1 eth0
- D. route add 192.168.1.1 default 192.168.1.50 eth0
Answer: C
NEW QUESTION 161
A systems administrator receives a report that the web server is not running after a planned system reboot.
After starting the web server manually, which of the following commands should the administrator issue to ensure the web server starts at boot time?
- A. systemctl on <name>.service
- B. systemctl service on
- C. systemctl enable <name>.service
- D. systemctl service enable
Answer: C
NEW QUESTION 162
An administrator needs to generate a list of services that are listening on TCP and/or UDP ports. Which of the following tools should the administrator use?
- A. portmap
- B. ethtool
- C. netstat
- D. route
Answer: C
NEW QUESTION 163
A Linux administrator suspects unauthorized users are attempting to log in to the Linux server remotely. Which of the following should the administrator check FIRST?
- A. /var/log/dmesg
- B. /var/log/messages
- C. /var/log/secure
- D. /var/log/kern.log
Answer: C
NEW QUESTION 164
Which of the following can be used to boot a DVD from a remote device to initialize a Linux system setup on bare metal hardware as if it is a local DVD?
- A. NFS
- B. UEFI
- C. GRUB
- D. PXE
Answer: B
Explanation:
Explanation/Reference: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/ ch-boot-x86
NEW QUESTION 165
A Linux administrator needs to switch from text mode to GUI. Which of the following runlevels will start the GUI by default?
- A. Runlevel 4
- B. Runlevel 6
- C. Runlevel 5
- D. Runlevel 3
Answer: C
Explanation:
Explanation/Reference: http://www.linfo.org/runlevel_def.html
NEW QUESTION 166
Which of the following would allow remote users to access a corporate server? (Choose two.)
- A. NTP server
- B. SMTP server
- C. VPN server
- D. SSH server
- E. File server
- F. DHCP server
Answer: C,D
NEW QUESTION 167
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 D
- C. Option B
- D. Option C
Answer: B
NEW QUESTION 168
A junior Linux administrator needs to ensure a service will start on system boot. Which of the following commands should be used to accomplish this task?
- A. service <service> enable
- B. crontab install <service>
- C. systemctl <service> bootup
- D. chkconfig <service> on
Answer: D
NEW QUESTION 169
Ann, a Linux administrator, wants to edit a configuration management file. When she opens the file to edit, her text editor reports that the file has been opened in read-only mode. She then tries to edit the file as root by elevating via sudo and is still unable to save any changes. The error message in her text editor says that the read-only option is set on the file. Ann checks the permissions on the file and sees the following:
-rw-rw-r-- 1 root wheel 30 Jun 13 15:38 infrastructure.yml
Which of the following commands is the BEST option to allow her to successfully modify the file?
- A. chattr -i infrastructure.yml
- B. chmod o+w infrastructure.yml
- C. chown root: infrastructure.yml
- D. chmod 600 infrastructure.yml
Answer: B
NEW QUESTION 170
A server, which is used to collect data about the network and datacenter environment via SNMP, is running out of space. Which of the following should the server administrator implement to reduce disk utilization?
- A. tar -cvf
- B. logrotate
- C. Snapshots
- D. journald
Answer: C
NEW QUESTION 171
A systems administrator wants to download a package from a remote server. Which of the following are the BEST commands to use for this task? (Choose two.)
- A. wget
- B. curl
- C. nc
- D. tar
- E. make
- F. zip
Answer: A,C
Explanation:
Reference:
https://www.unifiedremote.com/tutorials/how-to-install-unified-remote-server-deb-via-terminal
NEW QUESTION 172
A Linux administrator looks at the /etc/timezonefile and determines the need to change the time zone from California to New York temporarily. Which of the following commands will accomplish this?
- A. sed -f TZ=America/New_York
- B. cat TZ=America/New_York
- C. printf TZ=America/New_York
- D. export TZ=America/New_York
Answer: D
Explanation:
Explanation/Reference: https://www.thegeekstuff.com/2010/09/change-timezone-in-linux/
NEW QUESTION 173
A systems administrator configured a new kernel module, but it stopped working after reboot. Which of the following will allow the systems administrator to check for module problems during server startup?
- A. lsmod
- B. dmesg
- C. modprobe
- D. modinfo
Answer: D
Explanation:
Explanation/Reference: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ sec-displaying_information_about_a_module
NEW QUESTION 174
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.
Answer:
Explanation:

NEW QUESTION 175
A junior Linux administrator needs to ensure a service will start on system boot. Which of the following commands should be used to accomplish this task?
- A. service <service> enable
- B. crontab install <service>
- C. systemctl <service> bootup
- D. chkconfig <service> on
Answer: D
Explanation:
Explanation/Reference: https://geekflare.com/how-to-auto-start-services-on-boot-in-linux/
NEW QUESTION 176
An administrator needs to see the type of CPU that a server is running. Which of the following files contains this information?
- A. /etc/devices/info.conf
- B. /sys/dev/cpuinfo
- C. /dev/proc/cpu
- D. /proc/cpuinfo
Answer: D
NEW QUESTION 177
A Linux storage administrator wants to create a logical volume group. Which of the following commands is required to start the process?
- A. vgcreate
- B. mkfs.xfs
- C. pvcreate
- D. lvcreate
Answer: A
NEW QUESTION 178
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.
Answer:
Explanation:
NEW QUESTION 179
A systems administration team has decided to treat their systems as immutable instances. They keep the desired state of each of their systems in version control and apply automation whenever they provision a new instance. If there is an issue with one of their servers, instead of troubleshooting the issue, they terminate the instance and rebuild it using automation.
Which of the following is this an example of?
- A. Infrastructure as code
- B. Orchestration
- C. Agentless deployment
- D. Inventory
Answer: A
NEW QUESTION 180
......
Authentic Best resources for XK0-004 Online Practice Exam: https://www.lead1pass.com/CompTIA/XK0-004-practice-exam-dumps.html
Get the superior quality XK0-004 Dumps Questions from Lead1Pass: https://drive.google.com/open?id=1K1CLwfaLDPshIx4jlnoPpDaK5hIvO5Yz