XK0-004 Exam PDF [2023] Tests Free Updated Today with Correct 485 Questions
CompTIA XK0-004 Exam Preparation Guide and PDF Download
CompTIA Linux+ XK0-004 Exam
CompTIA Linux+ XK0-004 Exam which is related to CompTIA Linux+ Certification. This exam validates the Candidate ability to configure, monitor, and support servers running the Linux operating system. It also deals with the knowledge and skills of security, kernel modules, storage and visualization, device management at an enterprise level, git and automation, networking and firewalls, server side and command line, server (vs. client-based) coverage, troubleshooting and SELinux.
NEW QUESTION # 221
A systems administrator clones copies of a Linux VM every time a new Linux server is needed. The administrator notices the command prompt always states localhost.localdomain.
Which of the following should the administrator run to have the command prompt consistently labeled as Server1 rather than localhost.localdomain?
- A. echo "127.0.0.1 Server1 Server1.localdomain" >> /etc/hosts
- B. hostnamectl set-hostname Server1 --transient
- C. hostnamectl set-hostname Server1.localdomain --static
- D. hostnamectl set-hostname "Server1" --pretty
- E. host Server1
Answer: D
Explanation:
Reference:
https://www.tutorialspoint.com/how-to-setup-hostname-in-centos-7-x-or-rhel-7-x-linux-versions
NEW QUESTION # 222
During the final step of staging new Linux hardware, GRUB2 is installed to the system drive. Which of the following BEST describes the role of GRUB2 in a new Linux installation?
- A. It provides a method to pass parameters to the Linux kernel on startup.
- B. It provides a menu for running special shell scripts.
- C. It provides a menu for creating administrator task shortcuts.
- D. It provides a method to partition a hard drive.
Answer: B
Explanation:
Reference:
https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-moduledriver- configuration/Working_with_the_GRUB_2_Boot_Loader/
NEW QUESTION # 223
The lead Linux has added a disk, /dev/sdd, to a VM that is running out of disk space. Place the following steps in the correct order from first (1) to last (4) to add the disk to the existing LVM.
Answer:
Explanation:

NEW QUESTION # 224
A junior Linux administrator is updating local name resolution to support IPv6. The administrator issues the command cat /etc/hosts and receives the following output:
127.0.0.1 localhost
Which of the following actions should the administrator perform to accomplish this task?
- A. Modify the /etc/hosts file, and add the ipv4 localhost entry to the file.
- B. Modify the /etc/hosts file, and add the ::1 localhost entry to the file.
- C. Modify the /etc/hosts file, and add the ipv6 localhost entry to the file.
- D. Modify the /etc/hosts file, and add the 0.0.0.0 localhost entry to the file.
Answer: D
NEW QUESTION # 225
A systems administrator is enabling quotas on the /home directory of a Linux server. The administrator makes the appropriate edits to the /etc/fstab file and attempts to issue the commands to enable quotas on the desired directory. However, the administrator receives an error message stating the filesystem does not support quotas. Which of the following commands should the administrator perform to proceed?
- A. quotacheck -cg
- B. mount -o remount /home
- C. quotaon /home
- D. edquota /home
Answer: C
NEW QUESTION # 226
A server administrator is given the hash of an account password that needs to be synchronized across all servers.
Which of the following will allow the server administrator to configure the account password?
- A. Use the usermod command.
- B. Edit the password file.
- C. Use the passwd command.
- D. Edit the shadow file.
Answer: D
NEW QUESTION # 227
An administrator is configuring a new Linux server and wants to boot the system to a file that was previously downloaded to locally install removable medi a. Which of the following boot options should the administrator choose?
- A. ISO
- B. HTTP
- C. PXE
- D. NFS
Answer: A
NEW QUESTION # 228
A junior systems administrator needs to schedule a backup script named /scripts/backup.sh and make the correct changes to the crontab.
Which of the following crontab entries would run the script every Monday at 2:05 a.m.?
- A. 5 2 * * 0 /scripts/backup.sh
- B. 1 * * 5 2 /scripts/backup.sh
- C. 1 * * 2 5 /scripts/backup.sh
- D. 5 2 * * 1 /scripts/backup.sh
- E. 2 5 * * 1 /scripts/backup.sh
Answer: D
Explanation:
Minute (0 - 59) 0= every minute
Hour (0 - 23) 0= every hour
Day of month (1 - 31)
Month (1 - 12)
Day of week (0 - 7) (Sunday=0 or 7)
Reference:
https://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/
NEW QUESTION # 229
A Linux server has multiple IPs. A Linux administrator needs to verify if the HTTP server port is bound to the correct IP.
Which of the following commands would BEST accomplish this task?
- A. route
- B. netstat
- C. nslookup
- D. host
- E. ip
Answer: B
Explanation:
Explanation/Reference: https://www.tecmint.com/find-listening-ports-linux/
NEW QUESTION # 230
A systems administrator is required to allow only SSH access to the Linux servers from the 192.168.1.0/24 network. Which of the following iptables rules would accomplish this requirement?
- A. Option C
- B. Option D
- C. Option B
- D. Option A
Answer: C
NEW QUESTION # 231
An administrator is troubleshooting an issue where end users are waiting a very long times for processes to respond. The top command reveals that multiple processes seem to be m a non-responsive state or have become zombies. Which of the administrator use to clean up the system?
- A. Killall -o 15m
- B. Pkill -x
- C. Killall -n
- D. Pkill -o 15m
Answer: B
NEW QUESTION # 232
A Linux system is running normally when the systems administrator receives an alert that one application spawned many processes. The application is consuming a lot of memory, and it will soon cause the machine to become unresponsive. Which of the following commands will stop each application process?
- A. killall application
- B. pkill -9 application
- C. kill -9 'ps -aux | grep application'
- D. kill 'pidof application'
Answer: A
Explanation:
Explanation/Reference: https://www.tecmint.com/how-to-kill-a-process-in-linux/
NEW QUESTION # 233
A user cannot reach the internet from a workstation. A systems administrator performs diagnostics with the following results:
Which of the following is the cause for lack of internet connectivity?
- A. The company's firewall is blocking connections from the workstation to the internet.
- B. The network gateway is not reachable from the workstation.
- C. The incorrect network mask is set for the interface enp2so on the workstation.
- D. The workstation is not using a DNS server.
Answer: C
NEW QUESTION # 234
Given that a company's policy states that users cannot install third-party tools on Window servers, which of the following protocols will allow a Linux GUI to connect to a Windows server?
- A. NX
- B. VNC
- C. X11
- D. RDP
Answer: B
NEW QUESTION # 235
A Linux administrator recently changed the IP addresses of all the web servers from 10.10.50.x to 10.10.100.x. The administrator needs to update the serverlist.txt file to reflect the change.
The file contains the following:
10:WebSvr01:10.10.50.21:Main
11:WebSvr02:10.10.50.22:Acconting
12:WebSvr03:10.10.50.23:Intranet
20:NFS01:10.10.20.21:FileServer
30:SMTP01:10.10.30.31:Email
Which of the following commands will change the IP addresses and update the files in place?
- A. sed 's|.50|.100|g' serverlist.txt
- B. sed -g 's|.50|.100|a' serverlist.txt
- C. sed -i 's|.50|.100|' serverlist.txt
- D. sed -i 's|.50|.100|g' serverlist.txt
Answer: D
NEW QUESTION # 236
A Linux amdinisrator is adding a user's local Linux account to the accounting group. The user is also a member of the finance group. Which of the following is the BEST way to add the user to the accounting group while still maintaining the user's existing group members ships?
- A. Usermod -G accounting user1
- B. Usermod -aG accounting user1
- C. Usermod -G accounting, finance user1
- D. Usermod -G accounting user1
Answer: A
NEW QUESTION # 237
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/dhcpd.conf
- B. /etc/hosts
- C. /etc/nsswitch.conf
- D. /etc/resolv.conf
Answer: C
NEW QUESTION # 238
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?
httpd_can_network_connect = 1
- A. httpd_enable_cgi = 1
- B. httpd_enable_homedirs = 1
- C. httpd_enable_scripting = 1
Answer: C
NEW QUESTION # 239
A systems administrator needs to install a new piece of hardware that requires a new driver. The driver should be manually installed. Which of the following describes the order of commands required to obtain module information, install the module, and check the log for any errors during module installation?
- A. lsmod, modprobe, modinfo
- B. lsmod, insmod, dmesg
- C. modinfo, insmod, dmesg
- D. modinfo, insmod, modprobe
Answer: A
NEW QUESTION # 240
A systems administrator notices a large number of autoloaded device modules are no longer needed and decides to do a cleanup of them. Which of the following commands will accomplish this task?
- A. modprobe -r
- B. insmod -c
- C. depmod -r
- D. rmmod -c
Answer: A
NEW QUESTION # 241
The lead Linux has added a disk, /dev/sdd, to a VM that is running out of disk space. Place the following steps in the correct order from first (1) to last (4) to add the disk to the existing LVM.
Answer:
Explanation:

NEW QUESTION # 242
An administrator needs a bootable USB for installing a new Linux machine. The administrator downloaded the image file and named it as Linux_OS.iso in the /tmp directory. Which of the following commands will accomplish that task?
- A. dd if=/tmp/Linux_OS.iso out=/dev/sdb1 bs=512
- B. dd input=/tmp/Linux_OS.iso of=/dev/sda bs=512
- C. dd if=/tmp/Linux_OS.iso of=/dev/sda bs=512
- D. dd in=/tmp/Linux_OS.iso out=/dev/sdb bs=512
Answer: C
Explanation:
Reference:
the-command-line-way-380fca04e096
NEW QUESTION # 243
An administrator needs to mount the shared NFS file system testhost:/testvolumeto mount point /mnt/ testvoland make the mount persistent after reboot.
Which of the following BEST demonstrates the commands necessary to accomplish this task?
- A.

- B.

- C.

- D.

Answer: C
NEW QUESTION # 244
......
Verified & Correct XK0-004 Practice Test Reliable Source Sep 17, 2023 Updated: https://dumpstorrent.dumpsfree.com/XK0-004-valid-exam.html