CompTIA XK0-004 CompTIA Linux+ Certification Exam Online Training
CompTIA XK0-004 Online Training
The questions for XK0-004 were last updated at Nov 23,2024.
- Exam Code: XK0-004
- Exam Name: CompTIA Linux+ Certification Exam
- Certification Provider: CompTIA
- Latest update: Nov 23,2024
An administrator is analyzing a Linux server which was recently hacked.
Which of the following will the administrator use to find all unsuccessful login attempts?
- A . nsswitch
- B . faillock
- C . pam_tally2
- D . passwd
A Linux administrator wants to fetch a Git repository from a remote Git server.
Which of the following is the BEST command to perform this task?
- A . git checkout
- B . git clone
- C . git merge
- D . git config
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 CA INPUT Cp tcp Cm multiport –dports 80,443 Cm conntrack Ccstate NEW, ESTABLISHED Cj ACCEPT
- B . iptables CA INPUT Cp tcp Cm multiport –dports 80,443 Cm conntrack Ccstate ESTABLISHED Cj ACCEPT
- C . iptables CA INPUT Cp tcp Cm multiport –dports 80,443 Cm conntrack Ccstate RELATED, ESTABLISHED Cj ACCEPT
- D . iptables CA INPUT Cp tcp Cm multiport –dports 80,443 Cm conntrack Ccstate NEW, ESTABLISHED Cj REJECT
Which of the following statements BEST represents what the term “agentless” means regarding orchestration?
- A . Installation of a tool is not required on the remote system to perform orchestration tasks
- B . It facilitates version control when using infrastructure as code during orchestration
- C . It automatically removes malware from the remote system during orchestration
- D . A tool can only be accessed remotely to perform orchestration tasks
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
Which of the following is a difference between YAML and JSON?
- A . Users can comment in YAML but not in JSON
- B . JSON only curly brackets, while YAML only uses square brackets
- C . JSON is used in web development, while YAML is used solely in back-end systems.
- D . YAML has been deprecated for JSON.
A four-drive Linux NAS has been improperly configured. Each drive has a capacity of 6TB, for a total storage capacity of 24TB.
To reconfigure this unit to be not pluggable for drive replacement and provide total storage of 11TB to 12TB, which of the following would be the correct RAID configuration?
- A . RAID 01
- B . RAID 03
- C . RAID 10
- D . RAID 50
A Linux administrator needs every new file created on a directory to maintain the group permissions of the same directory.
Which of the following commands would satisfy this requirement?
- A . chmod o+s <directory>
- B . chmod u+s <directory>
- C . chmod +s <directory>
- D . chmod g+s <directory>
Which of the following BEST describes running on a Linux system?
- A . Containers only need the namespaces functionally to run on a Linux system available since kernel 2.6.
- B . Containers need a hypervisor to run a Linux system. Cgroups namespaces are functionalities used for the kernel but not for running containers.
- C . Containers only need the cgroups functionality for running on a Linux system. Namespaces is not a Linux kernel functionality needed for creating and managing containers.
- D . Containers use the cgroups and namespaces functionalities to isolate processes and assign hardware resources to each of those isolated processes.
A Linux administrator wants to obtain a list of files and subdirectories in the /etc directory that contain the word “services”. Once the files and subdirectories are discovered, they should be listed alphabetically in the /var/tmp/foundservices file.
Which of the following shell scripts will accomplish this task?
- A . #/bin/bashfind /etc Cname services | sort > /var/tmp/foundservices
- B . #/bin/bashlocate /etc Csort Cname services > /var/tmp/foundservices
- C . #/bin/bashfind Cname services Csort </var/tmp/foundservices
- D . #/bin/bashfind /etc Cname services Csort > /var/tmp/foundservices
No comment