[May 17, 2026] Get New XK0-005 Certification – Valid Exam Dumps Questions
100% Passing Guarantee - Brilliant XK0-005 Exam Questions PDF
NEW QUESTION # 96
A Linux administrator booted up the server and was presented with a non-GUI terminal. The administrator ran the command systemctl isolate graphical.target and rebooted the system by running systemctl reboot, which fixed the issue. However, the next day the administrator was presented again with a non-GUI terminal. Which of the following is the issue?
- A. The administrator did not reboot the server properly.
- B. The administrator did not set the default target to graphical.target.
- C. The administrator did not shut down the server properly.
- D. The administrator did not set the default target to basic.target.
Answer: B
NEW QUESTION # 97
Based on an organization's new cybersecurity policies, an administrator has been instructed to ensure that, by default, all new users and groups that are created fall within the specified values below.
To which of the following configuration files will the required changes need to be made?
- A. /etc/login.defs
- B. /etc/default/useradd
- C. /etc/security/limits.conf
- D. /etc/profile
Answer: A
Explanation:
The required changes need to be made to the /etc/login.defs configuration file. The /etc/login.defs file defines the default values for user and group IDs, passwords, shells, and other parameters for user and group creation.
The file contains the directives UID_MIN, UID_MAX, GID_MIN, and GID_MAX, which set the minimum and maximum values for automatic user and group ID selection. The administrator can edit this file and change the values to match the organization's new cybersecurity policies. This is the correct file to modify to accomplish the task. The other options are incorrect because they either do not affect the user and group IDs (
/etc/security/limits.conf or /etc/profile) or do not set the default values (/etc/default
/useradd). References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 15: Managing Users and Groups, page 463.
NEW QUESTION # 98
A cloud engineer needs to launch a container named web-01 in background mode. Which of the following commands will accomplish this task''
- A. docker builder -f -name web-01 httpd
- B. docker load --name web-01 httpd
- C. docker ps -a --name web-01 httpd
- D. docker run -d --name web-01 httpd
Answer: D
Explanation:
The docker run -d --name web-01 httpd command will launch a container named web-01 in background mode. This command will create and start a new container from the httpd image, assign it the name web-01, and run it in detached mode (-d), which means the container will run in the background without attaching to the current terminal. The docker builder -f --name web-01 httpd command is invalid, as builder is not a valid docker command, and -f and --name are not valid options for docker build. The docker load --name web-01
httpd command is invalid, as load does not accept a --name option, and httpd is not a valid file name for load.
The docker ps -a --name web-01 httpd command is invalid, as ps does not accept a --name option, and httpd is not a valid filter for ps. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 16:
Virtualization and Cloud Technologies, page 499.
NEW QUESTION # 99
An administrator has a CSV file named hosts.csv. The contents of hosts.csv include the following:
192.168.2.57,lnx1prd.example.com,Linux,Production
192.168.2.58,lnx2prd.example.com,Linux,Production
192.168.1.4,server15.example.com,Windows,Development
The administrator needs to create a second comma-separated list of only the Linux server IP addresses. Which of the following commands would achieve this need?
- A. for ip in $(grep "Linux" hosts.csv | sed "/$1//'); do echo -n "$ip,"; done
- B. for ip in $( cut -d"," -f1 hosts.csv | grep "Linux"); do echo -n "$ip,"; done
- C. for ip in $(awk -F, '{print $1}' hosts.csv | grep "Linux"); do echo -n
"$ip,"; done - D. for ip in $(grep "Linux" hosts.csv | cut -d"," -f1); do echo -n "$ip,"; done
Answer: D
Explanation:
Read the command syntax, cut is used to cut parts of lines from specified files or piped data and print the result to standard output. Sed is used for insertion, deletion, search and replace(substitution). We meed to use the standard output from the first part of the command to feed the second part.
NEW QUESTION # 100
A junior administrator updated the PostgreSQL service unit file per the data-base administrator's recommendation. The service has been restarted, but changes have not been applied. Which of the following should the administrator run for the changes to take effect?
- A. systemct1 daemon-reload
- B. Systemct1 get-default
- C. systemct1 enable postgresq1
- D. systemct1 mask postgresq1
Answer: A
Explanation:
To apply changes to a systemd service unit file, the administrator needs to reload the systemd daemon using the command systemct1 daemon-reload (B). This will make systemd aware of the new or changed unit files. The other commands will not reload the systemd daemon or apply the changes. Reference:
[CompTIA Linux+ Study Guide], Chapter 7: Managing System Services, Section: Modifying Systemd Services
[How to Reload Systemd Services]
NEW QUESTION # 101
While trying to access a website hosted on the server, the systems administrator receives the following error message:
The administrator then performs some diagnostics:
Which of the following commands should the administrator use to fix the issue?
- A. chcon -t httpd_sys_content_t /etc/httpd
- B. chmod -R 777 /var/www/website
- C. restorecon /var/www/html/website/index.html
- D. chown -R www:www /var/www/website
Answer: C
NEW QUESTION # 102
A Linux administrator is troubleshooting an SSHD issue on a server. Users are receiving error messages stating the connection is refused. Which of the following commands should be used to verify whether the service is listening?
- A. netstat
- B. route
- C. nslookup
- D. ifconfig
Answer: A
Explanation:
netstat is a command-line tool that displays network connections, routing tables, and a number of network interface statistics. It can be used to check if the SSHD service is listening on its default port (usually port 22) or any other configured port.
NEW QUESTION # 103
A newly hired junior administrator is studying the format of the /var/log/messages file. Which of the following commands should the administrator use to preserve the contents of the original file while also creating an identical file in the /home/admin directory?
- A. mv /var/log/messages /home/admin
- B. cat /var/log/messages > /home/admin/messages
- C. touch /var/log/messages /home/admin
- D. ln -s /var/log/messages /home/admin
Answer: B
Explanation:
Comprehensive and Detailed Step-by-Step
cat /var/log/messages > /home/admin/messages copies the file contents while preserving the original file.
touch only creates an empty file and does not copy contents.
mv moves the file instead of copying it.
ln -s creates a symbolic link but does not copy the contents.
NEW QUESTION # 104
A Linux administrator needs to restart a server and wants to see if any users are currently connected to it. Which of the following commands should the administrator run to find this information?
- A. id
- B. host
- C. w
- D. man
Answer: C
NEW QUESTION # 105
Users in the human resources department are trying to access files in a newly created directory. Which of the following commands will allow the users access to the files?
- A. chage
- B. chcon
- C. chgrp
- D. chattr
Answer: C
Explanation:
Explanation
The chgrp command is used to change the group ownership of files and directories. By using this command, the administrator can assign the files in the newly created directory to the human resources group, which will allow the users in that group to access them. The other commands are not relevant for this task. For example:
chattr is used to change the file attributes, such as making them immutable or append-only1.
chage is used to change the password expiration information for a user account2.
chcon is used to change the security context of files and directories, which is related to SELinux3.
References:
The CompTIA Linux+ Certification Exam Objectives mention that the candidate should be able to
"manage file and directory ownership and permissions" as part of the Hardware and System Configuration domain4.
The web search result 2 explains how to use the chgrp command with examples.
The web search result 3 compares the chmod and chgrp commands and their effects on file permissions.
NEW QUESTION # 106
A user is unable to log on to a Linux workstation. The systems administrator executes the following command:
cat /etc/shadow | grep user1
The command results in the following output:
user1 :! $6$QERgAsdvojadv4asdvaarC/9dj34GdafGVaregmkdsfa:18875:0:99999:7 :::
Which of the following should the systems administrator execute to fix the issue?
- A. passwd -u user1
- B. chown -R userl:user1 /home/user1
- C. sed -i '/ ::: / :: /g' /etc/shadow
- D. chgrp user1:user1 /home/user1
Answer: A
Explanation:
Explanation
The output shows that the user1 account has a locked password, indicated by the exclamation point (!) in the second field of the /etc/shadow file1. To unlock the password and allow the user to log in, the systems administrator should use the passwd command with the -u (unlock) option2.
References: 1: Understanding the /etc/shadow File 2: How To Use The Passwd Command In Linux
NEW QUESTION # 107
An administrator added the port 2222 for the SSH server on myhost and restarted the SSH server. The administrator noticed issues during the startup of the service. Given the following outputs:
Which of the following commands will fix the issue?
- A. iptables -A INPUT -p tcp -- dport 2222 -j ACCEPT
- B. chcon system_u:object_r:ssh_home_t /etc/ssh/*
- C. firewall-cmd -- zone=public -- add-port=2222/tcp
- D. semanage port -a -t ssh_port_t -p tcp 2222
Answer: D
Explanation:
The correct answer is A. semanage port -a -t ssh_port_t -p tcp 2222
This command will allow the SSH server to bind to port 2222 by adding it to the SELinux policy. The semanage command is a utility for managing SELinux policies. The port subcommand is used to manage network port definitions. The -a option is used to add a new record, the -t option is used to specify the SELinux type, the -p option is used to specify the protocol, and the tcp 2222 argument is used to specify the port number. The ssh_port_t type is the default type for SSH ports in SELinux.
The other options are incorrect because:
B: chcon system_u:object_r:ssh_home_t /etc/ssh/*
This command will change the SELinux context of all files under /etc/ssh/ to system_u:object_r:ssh_home_t, which is not correct. The ssh_home_t type is used for user home directories that are accessed by SSH, not for SSH configuration files. The correct type for SSH configuration files is sshd_config_t.
C: iptables -A INPUT -p tcp --dport 2222 -j ACCEPT
This command will add a rule to the iptables firewall to accept incoming TCP connections on port 2222.
However, this is not enough to fix the issue, as SELinux will still block the SSH server from binding to that port. Moreover, iptables may not be the default firewall service on some Linux distributions, such as Fedora or CentOS, which use firewalld instead.
D: firewall-cmd --zone=public --add-port=2222/tcp
This command will add a rule to the firewalld firewall to allow incoming TCP connections on port 2222 in the public zone. However, this is not enough to fix the issue, as SELinux will still block the SSH server from binding to that port. Moreover, firewalld may not be installed or enabled on some Linux distributions, such as Ubuntu or Debian, which use iptables instead.
References:
* How to configure SSH to use a non-standard port with SELinux set to enforcing
* Change SSH Port on CentOS/RHEL/Fedora With SELinux Enforcing
* How to change SSH port when SELinux policy is enabled
NEW QUESTION # 108
A Linux administrator has installed a web server, a database server, and a web application on a server. The web application should be active in order to render the web pages. After the administrator restarts the server, the website displays the following message in the browser: Error establishing a database connection. The Linux administrator reviews the following relevant output from the systemd init files:
The administrator needs to ensure that the database is available before the web application is started. Which of the following should the administrator add to the HTTP server .service file to accomplish this task?
- A. ONFAILURE=mariadb.service
- B. TRIGGERS=mariadb.service
- C. WANTEDBY=mariadb.service
- D. REQUIRES=mariadb.service
Answer: D
Explanation:
The administrator should add REQUIRES=mariadb.service to the HTTP server .service file to ensure that the database is available before the web application is started. This directive specifies that the HTTP server unit requires the MariaDB server unit to be started before it can run. If the MariaDB server unit fails to start or stops for any reason, the HTTP server unit will also fail or stop. This way, the dependency between the web application and the database is enforced by systemd.
The other options are not correct directives for accomplishing this task. TRIGGERS=mariadb.service is not a valid directive in systemd unit files. ONFAILURE=mariadb.service means that the HTTP server unit will start only if the MariaDB server unit fails, which is not what we want. WANTEDBY=mariadb.service means that the HTTP server unit will be started when the MariaDB server unit is enabled, but it does not imply a strong dependency or ordering relationship between them. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 10: Managing Services with systemd; systemd.unit(5) - Linux manual page
NEW QUESTION # 109
A Linux server hosts Kerberos and LDAP, which of the following is the MOST likely role of this server?
- A. Clustering
- B. Certificate authority
- C. Authentication
- D. Database
Answer: C
NEW QUESTION # 110
The development team created a new branch with code changes that a Linux administrator needs to pull from the remote repository. When the administrator looks for the branch in Git, the branch in question is not visible.
Which of the following commands should the Linux administrator run to refresh the branch information?
- A. git branch
- B. git fetch
- C. git clone
- D. git checkout
Answer: B
Explanation:
Explanation
The git fetch command downloads commits, files, and refs from a remote repository into the local one. It also updates the remote-tracking branches, which are references to the state of the remote branches. By running git fetch, the administrator can see the new branch created by the development team and then use git checkout to switch to it12.
References: 1: Git - git-fetch Documentation 2: Git Fetch | Atlassian Git Tutorial
NEW QUESTION # 111
A systems administrator wants to install a new application that requires the newmod kernel module. Which of the following commands should the systems administrator use?
- A. lsof newmod
- B. lsmod newmod
- C. modprobe newmod
- D. modinfo newmod
Answer: C
Explanation:
Use the modprobe command to add or remove modules on Linux. The command works intelligently and adds any dependent modules automatically. The kernel uses modprobe to request modules. The modprobe command searches through the standard installed module directories to find the necessary drivers.
NEW QUESTION # 112
A Linux user reported the following error after trying to connect to the system remotely:
ssh: connect to host 10.0.1.10 port 22: Resource temporarily unavailable The Linux systems administrator executed the following commands in the Linux system while trying to diagnose this issue:
Which of the following commands will resolve this issue?
- A. firewall-cmd --zone=public --permanent --add-service=22
- B. systemct1 enable firewalld; systemct1 restart firewalld
- C. firewall-cmd --zone=public --permanent --add-service=ssh
- D. firewall-cmd --zone=public --permanent --add-port=22/udp
Answer: C
Explanation:
The firewall-cmd --zone=public --permanent --add-service=ssh command will resolve the issue by allowing SSH connections on port 22 in the public zone of the firewalld service. This command will add the ssh service to the permanent configuration of the public zone, which means it will persist after a reboot or a reload of the firewalld service. The firewall-cmd --zone=public --permanent --add-service=22 command is invalid, as 22 is not a valid service name. The systemct1 enable firewalld; systemct1 restart firewalld command will enable and restart the firewalld service, but it will not change the firewall rules. The firewall-cmd --zone=public -- permanent --add-port=22/udp command will allow UDP traffic on port 22 in the public zone, but SSH uses TCP, not UDP. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Securing Linux Systems, page 543.
NEW QUESTION # 113
A systems administrator is configuring a Linux system so that network traffic from the internal network 172.17.0.0/16 going out through the eth0 interface would appear as if it was sent directly from this interface. Which of the following commands will accomplish this task?
- A. nmcli snasq-traffic eth0 -s 172.17.0.0/16 -j MASQUERADE
- B. firewalld -A OUTPUT -s 172.17.0.0/16 -o eth0 -j DIRECT
- C. iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE
- D. ifconfig --nat eth0 -s 172.17.0.0/16 -j DIRECT
Answer: C
Explanation:
The command iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE configures Network Address Translation (NAT) using iptables. This ensures that traffic from the internal network (172.17.0.0/16) going out through the eth0 interface will appear to be originating from the eth0 IP address. This is commonly used for internet-sharing or NAT setups in Linux.
NEW QUESTION # 114
Which of the following best describes the function of Linux inodes?
- A. To store data using copy-on-write
- B. To manage a list of filesystem ACLs
- C. To store encrypted file data
- D. To track file metadata
Answer: D
Explanation:
In Linux filesystems, an inode is a data structure used to store information (metadata) about a file, excluding the filename or actual data content.
* D is correct: Inodes track metadata like permissions, owner, timestamps, and disk block locations.
Incorrect Options:
* A: ACLs are separate and extend permissions beyond standard inodes.
* B: Copy-on-write is a feature of filesystems like Btrfs or ZFS, not a direct function of inodes.
* C: Inodes do not store encrypted content; encryption is a separate layer.
Reference:
CompTIA Linux+ XK0-005 Official Study Guide, Chapter 6
man inode
NEW QUESTION # 115
A Linux administrator is configuring a two-node cluster and needs to be able to connect the nodes to each other using SSH keys from the root account. Which of the following commands will accomplish this task?
- A. [root@nodea ssh -i ~/ . ssh/±d rsa root@nodeb
- B. [root@nodea scp -i . ssh/id rsa root@nodeb
- C. [root@nodea # ssh add -c ~/ . ssh/id rsa root@nodeb
- D. [root@nodea ssh-copy-id -i .ssh/id rsa root@nodeb
- E. [root@nodea # ssh add -c ~/. ssh/id rsa root@nodeb
Answer: D
Explanation:
The ssh-copy-id command is used to copy a public SSH key from a local machine to a remote server and add it to the authorized_keys file, which allows passwordless authentication between the machines. The administrator can use this command to copy the root user's public key from nodea to nodeb, and vice versa, to enable SSH access between the nodes without entering a password every time. For example: [root@nodea ssh-copy-id -i ~/.ssh/id_rsa root@nodeb]. The ssh command is used to initiate an SSH connection to a remote server, but it does not copy any keys. The scp command is used to copy files securely between machines using SSH, but it does not add any keys to the authorized_keys file. The ssh-add command is used to add private keys to the SSH agent, which manages them for SSH authentication, but it does not copy any keys to a remote server.
NEW QUESTION # 116
......
CompTIA XK0-005, also known as the CompTIA Linux+ certification exam, is a vendor-neutral certification that validates the skills and knowledge of IT professionals in the Linux operating system. CompTIA Linux+ Certification Exam certification is ideal for individuals who want to demonstrate their expertise in Linux and open-source technologies. The CompTIA Linux+ certification is recognized globally and is highly valued by employers.
Free XK0-005 braindumps download: https://www.prep4sures.top/XK0-005-exam-dumps-torrent.html
XK0-005 Dumps 2026 - NewCompTIA Exam Questions: https://drive.google.com/open?id=1Zd-AFnBpakKTUSyA-sa8KNXrYDX8tplA