XK0-004 Dumps 2021 - New CompTIA XK0-004 Exam Questions
Free XK0-004 Braindumps Download Updated on Dec 22, 2021 with 266 Questions
Who should take the XK0-004 exam
The CompTIA Linux+ certification is an internationally-recognized validation that identifies persons who earn it as possessing skilled in CompTIA Linux+. if a candidate wants significant improvement in career growth needs enhanced knowledge, skills, and talents. The CompTIA Linux+ certification provides proof of this advanced knowledge and skill. If a candidate has knowledge of associated technologies and skills that are required to pass CompTIA XK0-004 Exam then he should take this exam.
NEW QUESTION 128
A user wants to list the lines of a log, adding a correlative number at the beginning of each line separated by a set of dashes from the actual message. Which of the following scripts will complete this task?
- A. Option A
- B. Option C
- C. Option B
- D. Option D
Answer: D
NEW QUESTION 129
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. fdisk -l
- B. cdu -scg /
- C. df -h
- D. fsck /
Answer: C
NEW QUESTION 130
A junior systems administrator created a new filesystem /dev/sda1with mountpoint /dataand added it to the /etc/fstabfor auto-mounting.
When the systems administrator tries to mount the file system, the system refuses. Given the output below:
Which of the following steps is necessary?
- A. Change the dump column to 1 and run the mount -acommand.
- B. Change the filesystem from /dev/sda1to /dev/sda2and reboot.
- C. Change the mount point to data and reboot.
- D. Change the options to auto,dev,sync,rw,nosuidand run the mount -acommand.
Answer: D
NEW QUESTION 131
In which of the following Linux GUI environments would the Konsole application MOST likely be found?
- A. Cinnamon
- B. MATE
- C. Gnome
- D. KDE
- E. Unity
Answer: D
Explanation:
Reference:
https://opensource.com/life/17/10/top-terminal-emulators
NEW QUESTION 132
A systems administrator needs to run the yum update command two hours after employees log off and leave for the day on Friday.
Which of the following is the BEST command to complete the task, if the task only needs to be run once?
- A. nohup
- B. screen
- C. at
- D. cron
Answer: A
NEW QUESTION 133
A junior Linux administrator is installing a new application with CPU architecture requirements that have the following specifications:
* x64 bit
* 3.0GHz speed
* Minimum quad core
The administrator wants to leverage existing equipment but is unsure whether the requirements of these systems are adequate. The administrator issues the following command cat/proc/cpuinfo. The output of the command is as follows:
Which of the following is the recommended course of action the administrator should take based on this output?
- A. Install the application, as the system meets the application requirements
- B. Recompile the Linux kernel to support the installation.
- C. Procure new equipment that matches the recommended specifications
- D. Reconfigure libmodules to support the new application.
Answer: A
NEW QUESTION 134
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 for should be changed to while in the loop.
- B. $(cat ip-list.txt) should be changed to `cat ip-list.txt` in the for statement.
- C. The -ne flag should be changed to -eq in the if statement.
- D. The > should be changed to 2> in the do statement.
Answer: B
NEW QUESTION 135
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 REJECT
- B. iptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack -cstate RELATED, ESTABLISHED -j ACCEPT
- C. iptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack -cstate ESTABLISHED -j ACCEPT
- D. iptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack -cstate NEW, ESTABLISHED -j ACCEPT
Answer: B
Explanation:
Reference:
https://serverfault.com/questions/578730/when-using-iptables-firewall-rules-why-assert-new-state-on-all-allowed-ports
NEW QUESTION 136
A Linux user wants to give read-only permissions to a directory and its contents. Which of the following commands will allow the user to accomplish this task?
- A. chmod -R 400 /new_directory/
- B. chmod 400 /new_directory/
- C. chmod 600 /new_directory/
- D. chmod -R 600 /new_directory/
Answer: C
Explanation:
Explanation/Reference: https://www.linode.com/docs/guides/modify-file-permissions-with-chmod/
NEW QUESTION 137
A user wants to list the lines of a log, adding a correlative number at the beginning of each line separated by a set of dashes from the actual message. Which of the following scripts will complete this task?
- A.

- B.

- C.

- D.

Answer: C
NEW QUESTION 138
An administrator is installing a new kernel but is getting an error indicating the filesystem is out of space. A disk usage check shows / has plenty of space.
Which of the following BEST represents where the administrator should check next?
- A. /boot
- B. /proc
- C. /etc
- D. /var
Answer: B
NEW QUESTION 139
A Linux server needs to be accessed, but the root password is not available.
Which of the following would BEST allow an administrator to regain access and set a new known password at the same time?
- A. Boot into a single-user mode and reset the password via the passwdcommand.
- B. Boot into a single-user mode and reset the password via the chagecommand.
- C. Boot into a single-user mode and reset the password by editing the /etc/shadowfile.
- D. Boot into a single-user mode and reset the password by editing the /etc/passwdfile.
Answer: A
Explanation:
Explanation/Reference: https://phoenixnap.com/kb/how-to-change-root-password-linux
NEW QUESTION 140
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 menu for creating administrator task shortcuts.
- B. It provides a method to partition a hard drive.
- C. It provides a method to pass parameters to the Linux kernel on startup.
- D. It provides a menu for running special shell scripts.
Answer: D
NEW QUESTION 141
A systems administrator observes high latency values when reaching a remote web server. Which of the following commands will help determine and isolate issues on the network side?
- A. dig
- B. route
- C. mtr
- D. netstat
Answer: C
Explanation:
Reference:
https://www.keycdn.com/support/what-is-latency
NEW QUESTION 142
A Linux administrator retrieved a repository of files from a Git server using git clone. The administrator wants to see if a configuration file was added to the repository. Which of the following Git arguments should be used to see the recent modifications?
- A. init
- B. fetch
- C. pull
- D. log
Answer: C
NEW QUESTION 143
A systems administrator suspects a process with a PID of 2864 is consuming resources at an alarming rate.
The administrator uses the command renice -n -5 -p2864, but it does not solve the issue. Which of the following commands should the administrator execute to correct the issue?
- A. renice -n 10 -p 2864
- B. renice -n -10 -p 2864
- C. nice -n -5 -p 2864
- D. nice -n 5 -p 2864
Answer: B
NEW QUESTION 144
A Linux administrator needs to add some files in a directory to the Git repository but must exclude some local
.tmp files that are occasionally created by the scripts.
Which of the following is the BEST way to accomplish this task?
- A. echo .tmp >> .gitignore
- B. rm -rf .tmp
- C. git add -x .tmp *
- D. git rm .tmp
Answer: A
NEW QUESTION 145
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 hide httpd
- B. systemctl stop httpd && systemctl mask httpd
- C. systemctl disable httpd && systemctl mask httpd
- D. systemctl disable httpd && systemctl hide httpd
Answer: B
NEW QUESTION 146
An administrator reviews the following configuration file provided by a DevOps engineer:
Which of the following would the application parsing this file MOST likely have to support?
- A. YAML
- B. SOAP
- C. AJAX
- D. JSON
Answer: D
NEW QUESTION 147
Which of the following would be the BEST solution for a systems administrator to access the graphical user environment of a Linux machine remotely?
- A. VNC
- B. X11
- C. RPC
- D. KDE
Answer: A
Explanation:
Explanation/Reference: https://www.sfu.ca/computing/about/support/tips/remote-to-linux-with-gui.html
NEW QUESTION 148
An administrator has written the following Bash script:
All necessary files exist in the correct locations. However, when the administrator executes /home/user/test.sh the following error is received:
No such file or directory
Which of the following is the MOST likely cause of the error?
- A. The script is not executable.
- B. The shebang points to the wrong path.
- C. Nslookup is not installed.
- D. The formatting of the file is incorrect.
Answer: B
NEW QUESTION 149
......
CompTIA XK0-004 Exam Practice Test Questions: https://www.prep4king.com/XK0-004-exam-prep-material.html
Updated Certification Exam XK0-004 Dumps - Practice Test Questions: https://drive.google.com/open?id=1bsPlzyEhIRomE5bYS7_40h-EGdcSTO_d

