Reliable Linux+ XK0-004 Dumps PDF Feb 07, 2022 Recently Updated Questions
Pass Your CompTIA XK0-004 Exam with Correct 266 Questions and Answers
NEW QUESTION 57
A Linux administrator is adding a static IP address to a network interface on a Linux system. The administrator modifies the ifcfg- eth0 configuration file with the following settings:
After the administrator restarts the Linux server, the system is not connected to the network. Which of the following configuration settings needs to be changed?
- A. Set USERCTL to yes and ONBOOT to no.
- B. Set NETMASK to 255.255.0.0 and ONBOOT to yes.
- C. Set BOOTPROTO to BOOTP and USERCTL to yes.
- D. Set BOOTPROTO to NONE and ONBOOT to yes.
Answer: B
Explanation:
Reference:
https://www.tecmint.com/set-add-static-ip-address-in-linux/
NEW QUESTION 58
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 59
An administrator is uncomfortable allowing users to log in as root. Which of the following ensures that root logins are disallowed?
- A. usermod -B root
- B. usermod -U root
- C. usermod -G root
- D. usermod -L root
Answer: C
Explanation:
Explanation/Reference: https://web.mit.edu/rhel-doc/4/RH-DOCS/rhel-sg-en-4/s1-wstation-privileges.html
NEW QUESTION 60
A junior systems administrator is upgrading a package that was installed on a Red Hat-based system. The administrator is tasked with the following:
Update and install the new package.
Verify the new package version is installed.
Which of the following should be done to BEST accomplish these task? (Choose two.)
- A. yum upgrade
- B. rpm -qa
- C. rpm -e <package name>
- D. yum install <package name>
- E. apt-get upgrade
- F. apt-get <package name>
Answer: B,D
Explanation:
Reference:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum
NEW QUESTION 61
A Linux systems administrator installed a new web server, which failed while attempting to start. The administrator suspects that SELinux is causing an issue and wants to temporarily put the system into permissive mode. Which of the following would allow the administrator to accomplish this?
echo SELINUX=PERMISSIVE >>
- A. sestatus 0
- B. setenforce 0
- C. /etc/sysconfig/selinux
- D. chcon httpd_sys_content_t /var/
Answer: B
NEW QUESTION 62
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/profilefile using a text editor navigate to the PATH element, add the missing locations, and restart the bash process to update the changes.
- B. Update the /etc/profile.dfile using a text editor, navigate to the PATH element, add the missing locations, and reboot to update the changes.
- C. Update the /etc/profile.dfile using a text editor, navigate to the PATH element, add the missing locations, and run the bash_completion.shscript to update the changes.
- D. Update the /etc/profilefile using a text editor, navigate to the PATH element, add the missing locations and run the . /etc/profilecommand to update the changes.
Answer: D
NEW QUESTION 63
A user requested a USB serial device to be added to a desktop computer. The device has built-in kernel driver support. The administrator tested the device installation and access, but the user cannot access the serial port.
Each time the user attempts to access the device, an error log is created that shows the user does not have permission to use the serial port. Which of the following will add a user to the group that has serial port capabilities?
- A. usermod -a -G dialout $USER
- B. usermod -a -G serialport $USER
- C. usermod -a -G root $USER
- D. usermod -a -G modem $USER
Answer: A
NEW QUESTION 64
A Linux administrator opens a ticket to have an external hard drive mounted. As a security policy, external storage kernel modules are disabled.
Which of the following is the BEST command for adding the proper kernel module to enable external storage modules?
rmmod /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-storage.ko
- A. storage.ko
- B. modinfo /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-
- C. storage.ko
depmod /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb- - D. storage.ko
insmod /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-
Answer: A
Explanation:
Explanation/Reference: https://www.cyberciti.biz/faq/linux-how-to-load-a-kernel-module-automatically-at-boot-time/
NEW QUESTION 65
A storage administrator in a virtualized environment has been told by a user that there is no space left on the volume to which the user can write. However, a check reveals that there is 20GB of unused space. Which of the following explains the discrepancy?
- A. The drive is thin provisioned
- B. The drive space is overallocated
- C. The drive is thick provision eager zeroed
- D. The drive is not formatted
Answer: A
NEW QUESTION 66
An administrator needs to look at a log for an application on a systemd-based system. There is no log for this application in /var/log. Which of the following is another way to view the application log on this system?
- A. journalctl -u application
- B. watch /var/lib/application/
- C. tail -f /var/log/secure
- D. systemctl application.service
Answer: D
NEW QUESTION 67
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/nsswitch.conf
- B. /etc/resolv.conf
- C. /etc/dhcpd.conf
- D. /etc/hosts
Answer: A
NEW QUESTION 68
Which of the following commands would show the default printer on a Linux system?
- A. lpq
- B. lpstat
- C. lpr
- D. lspci
Answer: A
Explanation:
Explanation/Reference: https://superuser.com/questions/123576/show-default-linux-printer
NEW QUESTION 69
Which of the following boot methods can a Linux administrator use to boot a Linux server remotely via a network interface card instead of a local disk?
- A. Kickstart
- B. NTP
- C. NFS
- D. PXE
Answer: D
NEW QUESTION 70
A technical support engineer receives a ticket from a user who is trying to create a 1KB file in the /tmp directory and is getting the following error No space left on device. The support engineer checks the /tmp directory, and it has 20GB of free space.
Which of the following BEST describes a possible cause for this error?
- A. the filesystem ran out of inodes.
- B. The filesystem is formatted with a 4MB block size.
- C. The /tmp directory is not mounted.
- D. The /tmp directory has been set with an immutable attribute.
Answer: A
Explanation:
Reference:
https://www.maketecheasier.com/fix-linux-no-space-left-on-device-error/
NEW QUESTION 71
A Linux administrator has installed a web application firewall in front of a web server running on HTTP port
8080 and successfully started the HTTP server. However, after opening the application URL in an Internet browser, the administrator discovered that the application does not work. The administrator performed the following diagnostic steps:
Output of sysctl -acommand:
Output of iptables -Lcommand:
Output of netstat -nltop | grep "8080":
Which of the following is the NEXT step the administrator should perform to permanently fix the issue at the kernel level?
- A. sysctl -w net.ipv4.ip_forward=1then run sysctl -w /etc/sysctl.confto enable the change
- B. Edit /etc/sysctl.conffile and add net.ipv4.ip_forward = 1then run sysctl -p /etc/ sysctl.confto enable the change
- C. Add iptables rule iptables -A FORWARD-m state --state NEW -p tcp --dport 8080 -j ACCEPTthen restart httpddaemon
- D. Add iptables rule iptables -A INPUT -m state --state NEW -p tcp --dport 8080 -jthen restart httpddaemon
Answer: C
NEW QUESTION 72
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. mdadm -p /mnt/test
- B. mkdir -p /mnt/test
- C. mkfs /mnt/test
- D. touch /mnt/test
- E. mount -a /mnt/test
Answer: B
Explanation:
Reference:
https://serverfault.com/questions/751113/mount-point-does-not-exist-despite-creating-it
NEW QUESTION 73
A Linux administrator is adding a static IP address to a network interface on a Linux system. The administrator modifies the ifcfg- eth0 configuration file with the following settings:
After the administrator restarts the Linux server, the system is not connected to the network. Which of the following configuration settings needs to be changed?
- A. Set USERCTL to yes and ONBOOT to no.
- B. Set NETMASK to 255.255.0.0 and ONBOOT to yes.
- C. Set BOOTPROTO to BOOTP and USERCTL to yes.
- D. Set BOOTPROTO to NONE and ONBOOT to yes.
Answer: B
NEW QUESTION 74
A systems administrator has finished building a new feature for the monitoring software in a separate Git branch.
Which of the following is the BEST method for adding the new feature to the software's master branch?
- A. Clone the feature branch into the master branch.
- B. Save the changes to the master branch automatically with each Git commit.
- C. Merge the changes from the feature branch to the master branch.
- D. Pull the changes from the feature branch into the master branch.
Answer: C
Explanation:
Explanation/Reference: https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
NEW QUESTION 75
A company requires all servers to be configured with the BIOS on Coordinated Universal Time and the OS on Central Standard Time.
Which of the following can be used to change the time according to these requirements? (Choose two.)
- A. time
- B. date
- C. crontab
- D. hwclock
- E. LC_ALL
- F. localectl
Answer: B,D
NEW QUESTION 76
A Linux administrator has installed a web application firewall in front of a web server running on HTTP port
8080 and successfully started the HTTP server. However, after opening the application URL in an Internet browser, the administrator discovered that the application does not work. The administrator performed the following diagnostic steps:
Output of sysctl -a command:
Output of iptables -L command:
Output of netstat -nltop | grep "8080":
Which of the following is the NEXT step the administrator should perform to permanently fix the issue at the kernel level?
- A. Add iptables rule iptables -A FORWARD-m state --state NEW -p tcp --dport 8080 -j ACCEPT then restart httpd daemon
- B. sysctl -w net.ipv4.ip_forward=1 then run sysctl -w /etc/sysctl.conf to enable the change
- C. Add iptables rule iptables -A INPUT -m state --state NEW -p tcp --dport 8080 -j then restart httpd daemon
- D. Edit /etc/sysctl.conf file and add net.ipv4.ip_forward = 1 then run sysctl -p /etc/ sysctl.conf to enable the change
Answer: A
NEW QUESTION 77
An organization wants to consolidate its entire user information in centralized storage using an X.500-based protocol. Which of the following protocols should be used for this implementation?
- A. RADIUS
- B. DHCP
- C. LDAP
- D. DNS
Answer: C
NEW QUESTION 78
A Linux administrator recently reprovisioned a new corporate web server to replace a legacy one. To minimize the impact on the company's users, the administrator modified the network and DNS settings of the new server to be the same as the legacy server.
When attempting to log in to the new server remotely over SSH, the following error message is displayed:
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
Which of the following should the administrator do to resolve the issue?
- A. Update the /etc/hosts file on the remote server and local machine.
- B. Add the administrator's public key to the authorized_keys on the remote server.
- C. Restart the network services on both the remote server and the local machine.
- D. Remove the entry for the web server from the known_hosts file on the local machine.
Answer: B
NEW QUESTION 79
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 B
- B. Option C
- C. Option A
- D. Option D
Answer: D
NEW QUESTION 80
An administrator is logged into a server remotely and wants to determine if the system is a VM. Which of the following commands would assist with this?
- A. dmesg
- B. vmstat
- C. ps
- D. top
Answer: B
Explanation:
Explanation/Reference: https://ostechnix.com/check-linux-system-physical-virtual-machine/
NEW QUESTION 81
......
Latest 2022 Realistic Verified XK0-004 Dumps: https://www.examsreviews.com/XK0-004-pass4sure-exam-review.html
Pass XK0-004 Exam Updated 266 Questions: https://drive.google.com/open?id=17Jh13NWSoamI3jFX0amtg34x8s9yZ8jd