Was :
$90
Today :
$50
Was :
$108
Today :
$60
Was :
$126
Today :
$70
What Is the XK0-005 Certification Exam?
The XK0-005 certification exam is a standardized assessment designed to measure a candidate's knowledge, competencies, and practical understanding within a defined professional field. It serves as the primary requirement for earning the Linux+ Certification, a credential that represents a recognized level of proficiency in its respective industry. Depending on the field, this may involve theoretical knowledge, applied problem-solving, regulatory understanding, or hands-on procedural competence.
The exam is typically developed and maintained by an accrediting body or professional organization that sets the standards for the Linux+ Certification. This ensures that anyone who earns the credential has met a consistent benchmark, regardless of where they studied or gained their experience. For many professionals, the XK0-005 Certification Exam represents a formal checkpoint in their career, one that confirms readiness to take on greater responsibility within their chosen field.
Why the Linux+ Certification Certification Matters?
Certifications like the Linux+ Certification exist because industries need a reliable way to verify competence beyond a resume or a job title. Earning this credential signals to employers, clients, and colleagues that a professional has invested time in building a structured foundation of knowledge and has been evaluated against an established standard.
Beyond individual recognition, the Linux+ Certification certification often supports broader professional development. It can influence hiring decisions, contribute to internal advancement, or serve as a prerequisite for more specialized roles within the field. In many industries, certifications also help standardize expectations across organizations, making it easier for professionals to move between employers or sectors while carrying a credential that is widely understood and respected.
Who Should Take the XK0-005 Exam?
The XK0-005 exam is generally relevant to individuals who are either entering a field or looking to formalize skills they have already developed through experience. This can include early-career professionals seeking a credential to support their first steps into the industry, as well as experienced practitioners who want official recognition of knowledge gained on the job.
Students preparing to enter the workforce may also pursue the XK0-005 exam as a way to strengthen their qualifications before graduating or applying for their first roles. In some fields, employers actively encourage or require staff to pursue this certification as part of ongoing professional development, particularly in industries where standards, safety, or compliance play a significant role in daily responsibilities.
Knowledge and Skills Evaluated in the CompTIA Linux+ Exam
The CompTIA Linux+ Exam is built to evaluate both foundational knowledge and the practical judgment needed to apply that knowledge in real situations. Candidates are generally expected to understand core principles and terminology relevant to their field, along with the reasoning behind established procedures, standards, or best practices.
Depending on the industry, this may include understanding regulatory requirements, following established protocols, applying analytical or technical methods, or exercising sound judgment in situations that require careful decision-making. Rather than testing isolated facts in a vacuum, the CompTIA Linux+ Exam tends to reward candidates who can connect concepts to realistic scenarios, reflecting the kind of thinking expected in day-to-day professional practice.
XK0-005 Exam Preparation Resources
Preparing for the XK0-005 certification exam becomes more effective when using high-quality and up-to-date study materials. MyCertsHub provides resources designed to help candidates build knowledge, practice consistently, and become familiar with the actual exam format.
How to Prepare for the XK0-005 Certification Exam?
Effective preparation for the XK0-005 certification exam usually begins with a clear understanding of the exam's objectives and structure. Reviewing official guidelines or documentation published by the certifying body provides the most accurate picture of what will be covered and how heavily different areas are weighted.
From there, many candidates benefit from building a structured study plan that breaks preparation into manageable sections over a set period of time. A well-organized XK0-005 Study Guide can help sequence this material logically, especially for those approaching a topic for the first time. Consistent review, paired with realistic practice, tends to produce better retention than concentrated last-minute studying.
Practical experience, where applicable to the field, also plays an important role in preparation. Working through XK0-005 Practice Questions and a XK0-005 practice test can help candidates identify gaps in their understanding and become familiar with the format and pacing of the actual exam. In fields where hands-on skill is assessed, supplementing study with real-world practice or supervised experience often makes the difference between recognizing correct information and genuinely understanding it.
Benefits of Earning the Linux+ Certification Certification
Successfully earning the Linux+ Certification certification offers benefits that extend well beyond passing a single exam. It provides documented proof of competence that can be referenced on a resume, professional profile, or internal performance review, offering a clear, third-party validation of skill and knowledge.
The credential can also strengthen professional credibility when working with clients, patients, stakeholders, or colleagues who may not be positioned to evaluate technical or specialized knowledge directly. Over time, this recognition often contributes to expanded career opportunities, whether through new responsibilities, higher-level roles, or eligibility for additional certifications that build on this foundational credential.
Prepare for the XK0-005 Exam with MyCertsHub
Preparing for the XK0-005 exam is a process that benefits from organized, consistent effort rather than rushed, last-minute review. MyCertsHub is designed to support that process by offering study resources, practice materials, and educational content that help candidates understand what the CompTIA Linux+ Exam covers and how to approach their preparation thoughtfully.
Whether someone is just beginning to explore the Linux+ Certification or is in the final stages of reviewing material before their exam date, MyCertsHub aims to serve as a dependable resource throughout that journey. Every candidate's path to certification looks a little different, and the goal remains the same: to provide clear, genuinely useful information that supports real understanding of the subject matter.
CompTIA XK0-005 Sample Question Answers
Question # 1
A Linux administrator provisioned a new web server with custom administrative permissions for
certain users. The administrator receives a report that user1 is unable to restart the Apache web
service on this server. The administrator reviews the following output:
[ root@server ] # id user1
UID=1011 (user1) gid=1011 (USER1) groups=1011 (user1), 101 (www-data), 1120 (webadmin)
[ root@server ] # cat /etc/sudoers.d/custom.conf
user1 ALL=/usr/sbin/systemctl start httpd, /usr/sbin/systemctl stop httpd
webadmin ALL=NOPASSWD: /etc/init.d.httpd restart, /sbin/service httpd restart,
/usr/sbin/apache2ctl restart
#%wheel ALL=(ALL) NOPASSWD: ALL
Which of the following would most likely resolve the issue while maintaining a least privilege
security model?
A. User1 should be added to the wheel group to manage the service. B. User1 should have "NOPASSWD:" after the "ALL=" in the custom. conf. C. The wheel line in the custom. conf file should be uncommented. D. Webadmin should be listed as a group in the custom. conf file.
Answer: D
Explanation:
The custom.conf file grants sudo privileges to user1 and webadmin for managing the Apache web
service, but it uses different commands for each of them. User1 is allowed to use systemctl to start
and stop the httpd service, while webadmin is allowed to use init.d, service, or apache2ctl to restart
the httpd service. However, the user1 is unable to restart the service, only start and stop it. To fix this,
user1 should be able to use the same commands as webadmin, which can be achieved by listing
webadmin as a group in the custom.conf file, using the syntax %groupname. This way, user1 will
inherit the sudo privileges of the webadmin group, and be able to restart the Apache web service
without compromising the least privilege security model.
Reference
Sudo and Sudoers Configuration | Servers for Hackers, section œGroups
Chapter 12. Managing sudo access - Red Hat Customer Portal, section œ12.1. Configuring sudo access
for users and groups
Question # 2
A Linux engineer needs to block an incoming connection from the IP address 2.2.2.2 to a secure shell
server and ensure the originating IP address receives a response that a firewall is blocking the
connection. Which of the following commands can be used to accomplish this task?
A. iptables -A INPUT -p tcp -- dport ssh -s 2.2.2.2 -j DROP B. iptables -A INPUT -p tcp -- dport ssh -s 2.2.2.2 -j RETURN C. iptables -A INPUT -p tcp -- dport ssh -s 2.2.2.2 -j REJECT D. iptables -A INPUT -p tcp -- dport ssh -s 2.2.2.2 -j QUEUE
Answer: C
Explanation:
The REJECT target sends back an error packet to the source IP address, indicating that the connection
is refused by the firewall. This is different from the DROP target, which silently discards the packet
without any response. The RETURN target returns to the previous chain, which may or may not
accept the connection. The QUEUE target passes the packet to a userspace application for further
processing, which is not the desired outcome in this case.
Reference
CompTIA Linux+ (XK0-005) Certification Study Guide, page 316
iptables - ssh - access from specific ip only - Server Fault, answer by Eugene Ionichev
Question # 3
After connecting to a remote host via SSH, an administrator attempts to run an application but
receives the following error:
[user@workstation ~]$ ssh admin@srv1
Last login: Tue Mar 29 18:03:34 2022
[admin@srvl ~] $ /usr/local/bin/config_manager
Error: cannot open display:
[admin@srv1 ~] $
Which of the following should the administrator do to resolve this error?
A. Disconnect from the SSH session and reconnect using the ssh -x command. B. Add Options X11 to the /home/admin/.ssh/authorized_keys file. C. Open port 6000 on the workstation and restart the firewalld service. D. Enable X11 forwarding in /etc/ssh/ssh_config and restart the server.
Answer: A
Explanation:
The error indicates that the application requires an X11 display, but the SSH session does not forward
the X11 connection. To enable X11 forwarding, the administrator needs to use the ssh -X option,
which requests X11 forwarding with authentication spoofing. This will set the DISPLAY environment
variable on the remote host and allow the application to open a window on the local display.
Reference
CompTIA Linux+ (XK0-005) Certification Study Guide, page 314
Open a window on a remote X display (why œCannot open display )?, answer by Gilles ˜SO- stop
being evil
Question # 4
A Linux administrator is configuring a new internal web server fleet. The web servers are up and
running but can only be reached by users directly via IP address. The administrator is attempting to
fix this inconvenience by requesting appropriate records from the DNS team. The details are:
Hostname: devel.comptia.org
IP address: 5.5.5.1, 5.5.5.2, 5.5.5.3, 5.5.5.4
Name server: 5.5.5.254
Additional names: dev.comptia.org, development.comptia.org
Which of the following types of DNS records should the Linux administrator request from the DNS
team? (Select three).
A. MX B. NS C. PTR D. A E. CNAME F. RRSIG G. SOA H. TXT
Answer: B,D,E
Explanation:
The Linux administrator should request the following types of DNS records from the DNS team:
A: This record type is used to map a hostname to an IPv4 address. The administrator needs four A
records for devel.comptia.org, one for each IP address (5.5.5.1, 5.5.5.2, 5.5.5.3, 5.5.5.4). This will
allow users to access the web servers by using the hostname devel.comptia.org instead of the IP
addresses1.
CNAME: This record type is used to create an alias for another hostname. The administrator needs
two CNAME records, one for dev.comptia.org and one for development.comptia.org, both pointing
to devel.comptia.org. This will allow users to access the web servers by using any of these three
hostnames interchangeably1.
NS: This record type is used to delegate a domain or a subdomain to another name server. The
administrator needs one NS record for comptia.org, pointing to 5.5.5.254, which is the name server
that hosts the records for the subdomain devel.comptia.org2. This will allow users to resolve the
hostnames under comptia.org by querying the name server 5.5.5.2542.
The other record types are not relevant for the administrators task:
MX: This record type is used to specify the mail exchange server for a domain or a subdomain1. The
administrator does not need this record type because the web servers are not intended to handle
email traffic.
PTR: This record type is used to map an IP address to a hostname, which is the reverse of an A
record1. The administrator does not need this record type because the web servers are not expected
to be accessed by their IP addresses.
RRSIG: This record type is used to provide digital signatures for DNSSEC, which is a security extension
for DNS that verifies the authenticity and integrity of DNS responses3. The administrator does not
need this record type because it is not mentioned in the task requirements.
SOA: This record type is used to provide information about the authoritative name server and other
parameters for a domain or a subdomain1. The administrator does not need this record type because
it is usually created automatically by the name server software when a new zone file is created4.
TXT: This record type is used to store arbitrary text data that can be used for various purposes, such
as SPF, DKIM, DMARC, etc1. The administrator does not need this record type because it is not
related to the web server functionality.
SRV: This record type is used to specify the location and port number of a service that runs on a
domain or a subdomain1. The administrator does not need this record type because the web servers
use the standard HTTP port 80, which does not require an SRV record.
Reference: 1: DNS Record Types “ CompTIA Network+ N10-007 “ 1.8 2: NS Record - DNSimple Help 3:
DNSSEC - Wikipedia 4: SOA Record - DNSimple Help
Question # 5
A systems administrator created a new directory with specific permissions. Given the following
output:
# file: comptia
# owner: root
# group: root
user: : rwx
group :: r-x
other: :---
default:user :: rwx
default:group :: r-x
default:group:wheel: rwx
default:mask :: rwx
default:other ::-
Which of the following permissions are enforced on /comptia?
A. Members of the wheel group can read files in /comptia. B. Newly created files in /comptia will have the sticky bit set. C. Other users can create files in /comptia. D. Only root can create files in /comptia.
Answer: A
Explanation:
The output shows the file access control list (FACL) of the /comptia directory, which is an extension of
the standard Linux permissions that allows more fine-grained control over file and directory access1.
The FACL consists of two parts: the access ACL and the default ACL. The access ACL applies to the
current object, while the default ACL applies to the objects created within the directory2.
The access ACL has three entries: user, group, and other. These are similar to the standard Linux
permissions, but they can be specified for individual users or groups as well. The user entry shows
that the owner of the directory (root) has read, write, and execute permissions (rwx). The group
entry shows that the group owner of the directory (root) has read and execute permissions (r-x). The
other entry shows that all other users have no permissions (”).
The default ACL has five entries: user, group, group:wheel, mask, and other. These are applied to any
files or directories created within /compti
a. The user entry shows that the owner of the new object will have read, write, and execute
permissions (rwx). The group entry shows that the group owner of the new object will have read and
execute permissions (r-x). The group:wheel entry shows that the members of the wheel group will
have read, write, and execute permissions (rwx) on the new object. The mask entry shows that the
maximum permissions allowed for any user or group are read, write, and execute (rwx). The other
entry shows that all other users will have no permissions (”) on the new object.
Therefore, based on the FACL output, members of the wheel group can read files in /comptia, as they
have read permission on both the directory and any files within it. Option B is incorrect because the
sticky bit is not set on /comptia or any files within it. The sticky bit is a special permission that
prevents users from deleting or renaming files that they do not own in a shared directory3. It is
symbolized by a t character in the execute position of others. Option C is incorrect because other
users cannot create files in /comptia, as they have no permissions on the directory or any files within
it. Option D is incorrect because root is not the only user who can create files in /comptia. Any user
who has write permission on the directory can create files within it, such as members of the wheel
group
Question # 6
An administrator thinks that a package was installed using a snap. Which of the following commands
can the administrator use to verify this information?
A. snap list B. snap find C. snap install D. snap try
Answer: A
Explanation:
The snap list command is used to display the installed snaps on the system1. Snaps are self-contained
software packages that can be installed and updated across different Linux distributions2. The snap
list command shows the name, version, revision, developer and notes of each snap1.
The snap find command is used to search for snaps in the Snap Store, which is an online repository of
snaps2. The snap install command is used to install snaps from the Snap Store or from a local
file2. The snap try command is used to test a snap without installing it, by mounting a directory that
contains the snap files2. These commands are not useful for verifying if a package was installed using
a snap.
Question # 7
An application developer received a file with the following content:
##This is a sample Image ##
FROM ubuntu:18.04
MAINTAINER [email protected]
COPY . /app
RUN make /app
CMD python /app/app.py
RUN apt-get update
RUN apt-get install -y nginx
CMD ["echo","Image created"]
The developer must use this information to create a test bed environment and identify the image
(myimage) as the first version for testing a new
application before moving it to production. Which of the following commands will accomplish this
task?
A. docker build -t myimage:1.0 . B. docker build -t myimage: . C. docker build -t myimage-1.0 . D. docker build -i myimage:1.0 .
Answer: A
Explanation:
The docker build command is used to build an image from a Dockerfile and a context1. The
Dockerfile is a text file that contains the instructions for creating the image, and the context is a set of
files that can be used in the image creation process1. The file that the developer received is an
example of a Dockerfile.
The -t option is used to specify a name and an optional tag for the image1. The name and tag are
separated by a colon (:), and the tag is usually used to indicate the version of the image2. For
example, -t myimage:1.0 means that the image will be named myimage and tagged as 1.0.
The last argument of the docker build command is the path to the context, which can be a local
directory or a URL1. The dot (.) means that the current working directory is the context2. Therefore,
docker build -t myimage:1.0 . means that the image will be built from the Dockerfile and the files in
the current working directory, and it will be named myimage and tagged as 1.0.
Question # 8
A non-privileged user is attempting to use commands that require elevated account permissions, but
the commands are not successful. Which of the following most likely needs to be updated?
A. /etc/passwd B. /etc/shadow C. /etc/sudoers D. /etc/bashrc
Answer: C
Explanation:
The /etc/sudoers file is used to configure the sudo command, which allows non-privileged users to
execute commands that require elevated account permissions1. The file contains a list of users and
groups that are allowed to use sudo, and the commands they can run with it. The file also defines the
security policy for sudo, such as whether a password is required, how long the sudo session lasts, and
what environment variables are preserved or reset.
The /etc/passwd file is used to store information about the user accounts on the system, such as
their username, user ID, home directory, and login shell. The /etc/shadow file is used to store the
encrypted passwords for the user accounts, along with other information such as password
expiration and aging. These files are not directly related to the sudo command, and updating them
will not grant a user elevated account permissions.
The /etc/bashrc file is used to set up the environment for the bash shell, such as aliases, functions,
variables, and options. This file is executed whenever a new bash shell is started, and it affects all
users on the system. However, this file does not control the sudo command or its configuration, and
updating it will not allow a user to use commands that require elevated account permissions.
Question # 9
A Linux administrator wants to prevent the httpd web service from being started both manually and
automatically on a server. Which of the following should the administrator use to accomplish this
task?
A. systemctl mask httpd B. systemctl disable httpd C. systemctl stop httpd D. systemctl reload httpd
Answer: A
Explanation:
The best command to use to prevent the httpd web service from being started both manually and
automatically on a server is
A) systemctl mask httpd. This command will create a symbolic link from the httpd service unit file to
/dev/null, which will make the service impossible to start or enable. This is different from systemctl
disable httpd, which will only prevent the service from starting automatically on boot, but not
manually. The other commands are either not relevant or not sufficient for this task. For example:
C) systemctl stop httpd will only stop the service if it is currently running, but it will not prevent it
from being started again.
D) systemctl reload httpd will only reload the configuration files of the service, but it will not stop or
disable it.
Question # 10
A new application container was built with an incorrect version number. Which of the following
commands should be used to rename the image to match the correct version 2.1.2?
A. docker tag comptia/app:2.1.1 comptia/app:2.1.2 B. docker push comptia/app:2.1.1 comptia/app:2.1.2 C. docker rmi comptia/app:2.1.1 comptia/app:2.1.2 D. docker update comptia/app:2.1.1 comptia/app:2.1.2
Answer: A
Explanation:
The best command to use to rename the image to match the correct version 2.1.2 is
A. docker tag
comptia/app:2.1.1 comptia/app:2.1.2. This command will create a new tag for the existing image
with the new version number, without changing the image content or ID. The other commands are
either incorrect or not suitable for this task. For example:
B) docker push comptia/app:2.1.1 comptia/app:2.1.2 will try to push two images to a remote
repository, but it does not rename the image locally.
C) docker rmi comptia/app:2.1.1 comptia/app:2.1.2 will try to remove two images from the local
system, but it does not rename the image.
D) docker update comptia/app:2.1.1 comptia/app:2.1.2 will try to update the configuration of a
running container, but it does not rename the image.
Question # 11
Which of the following should be used to verify the integrity of a file?
A. sha256sum B. fsck C. gpg ”d D. hashcat
Answer: A
Explanation:
The best tool to use to verify the integrity of a file is
A) sha256sum. This tool will compute and display the SHA-256 hash of a file, which is a 64-digit
hexadecimal number that uniquely identifies the files content. By comparing the hash of a
downloaded file with the hash provided by the file owner or source, you can confirm that the file has
not been altered or corrupted during the transfer. The other tools are either not relevant or not
suitable for this task. For example:
B) fsck is a tool for checking and repairing the file system, but it does not verify the integrity of
individual files.
C) gpg -d is a tool for decrypting files that have been encrypted with GnuPG, but it does not verify the
integrity of unencrypted files.
D) hashcat is a tool for cracking passwords or hashes, but it does not verify the integrity of files
Question # 12
An administrator runs ping comptia.org. The result of the command is:
ping: comptia.org: Name or service not known
Which of the following files should the administrator verify?
A. /etc/ethers B. /etc/services C. /etc/resolv.conf D. /etc/sysctl.conf
Answer: C
Explanation:
The best file to verify when the ping command returns the error œName or service not known is C.
/etc/resolv.conf. This file contains the configuration for the DNS resolver, which is responsible for
translating domain names into IP addresses. If this file is missing, corrupted, or has incorrect entries,
the ping command will not be able to resolve the domain name and will fail with the error. To fix this
issue, the administrator should check that the file exists, has proper permissions, and has valid
nameserver entries. For example, a typical /etc/resolv.conf file may look like this:
nameserver 8.8.8.8 nameserver 8.8.4.4
These are the IP addresses of Googles public DNS servers, which can be used as a fallback option if
the default DNS servers are not working.
Question # 13
A systems administrator creates a public key for authentication. Which of the following tools is most
suitable to use when uploading the key to the remote
servers?
A. scp B. ssh-copy-id C. ssh-agent D. ssh-keyscan
Answer: B
Explanation:
The best tool to use when uploading the public key to the remote servers is B. ssh-copy-id. This tool
will copy the public key from the local computer to the remote server and append it to the
authorized_keys file, which is used for public key authentication. This tool will also create the
necessary directories and files on the remote server if they do not exist. The other tools are either
not suitable or not relevant for this task. For example:
A) scp is a tool for securely copying files between hosts, but it does not automatically add the public
key to the authorized_keys file.
C) ssh-agent is a tool for managing private keys and passphrases, but it does not upload the public
key to the remote server.
D) ssh-keyscan is a tool for collecting public keys from remote hosts, but it does not upload the public
key to the remote server.
Question # 14
A Linux administrator needs to transfer a local file named accounts . pdf to a remote / tmp directory
of a server with the IP address 10.10.10.80. Which of the following commands needs to be executed
to transfer this file?
Explanation:
The best command to use to transfer the local file accounts.pdf to the remote /tmp directory of the
server with the IP address 10.10.10.80 is B. scp accounts.pdf [email protected]:/tmp. This command
will use the secure copy protocol (scp) to copy the file from the local machine to the remote server
over SSH. The command requires the username and password of the user on the remote server, as
well as the full path of the destination directory.
The other commands are either incorrect or not suitable for this task. For example:
A) rsync [email protected]:/tmp accounts.pdf will try to use the rsync command to synchronize files
between the local and remote machines, but it has the wrong syntax and order of arguments. The
source should come before the destination, and a colon (:) should separate the remote host and
path.
C) cp [email protected]:/tmp accounts.pdf will try to use the cp command to copy files, but it does
not work over SSH and it has the wrong syntax and order of arguments. The source should come
before the destination, and a colon (:) should separate the remote host and path.
D) ssh accounts.pdf [email protected]:/tmp will try to use the ssh command to log into the remote
server, but it has the wrong syntax and arguments. The username should come before the remote
host, and a file name is not a valid argument for ssh.
Question # 15
Due to performance issues on a server, a Linux administrator needs to termi-nate an unresponsive
process. Which of the following commands should the
administrator use to terminate the process immediately without waiting for a graceful shutdown?
A. kill -SIGKILL 5545 B. kill -SIGTERM 5545 C. kill -SIGHUP 5545 D. kill -SIGINT 5545
To terminate an unresponsive process immediately without waiting for a graceful shutdown, the
administrator can use the command kill -SIGKILL 5545 (A). This will send a signal to the process with
the PID 5545 that cannot be ignored or handled by the process, and force it to stop. The other
commands will send different signals that may allow the process to perform some cleanup or
termination actions, or may be ignored by the process. Reference:
[CompTIA Linux+ Study Guide], Chapter 6: Managing Processes, Section: Killing Processes
[How to Kill Processes in Linux]
Question # 16
A DevOps engineer wants to allow the same Kubernetes container configurations to be deployed in
development, testing, and production environments. A key requirement is that the containers should
be configured so that developers do not have to statically configure custom, environment-specific
locations. Which of the following should the engineer use to meet this requirement?
A. Custom scheduler B. Node affinity C. Overlay network D. Ambassador container
To allow the same Kubernetes container configurations to be deployed in different environments
without statically configuring custom locations, the engineer can use an ambassador container (D).
An ambassador container is a proxy container that handles communication between containers and
external services. It can dynamically configure locations based on environment variables or other
methods. The other options are not related to this requirement. Reference:
[CompTIA Linux+ Study Guide], Chapter 11: Working with Containers, Section: Using Ambassador
Containers
[How to Use Ambassador Containers]
Question # 17
A senior Linux administrator has created several scripts that will be used to install common system
applications. These scripts are published to a reposito-ry to share with the systems team. A junior
Linux administrator needs to re-trieve the scripts and make them available on a local workstation.
Which of the following Git commands should the junior Linux administrator use to accom-plish this
task?
A systems administrator wants to delete app . conf from a Git repository. Which of the following
commands will delete the file?
A. git tag app. conf B. git commit app . conf C. git checkout app . conf D. git rm app. conf
To delete a file from a Git repository, the administrator can use the command git rm app.conf (D).
This will remove the file œapp.conf from the working directory and stage it for deletion from the
repository. The administrator can then commit the change with git commit -m "Delete app.conf" to
finalize the deletion. The other commands will not delete the file, but either tag, commit, or
checkout the file. Reference:
[CompTIA Linux+ Study Guide], Chapter 10: Working with Git, Section: Deleting Files with Git
[How to Delete Files from Git]
Question # 19
A developer needs to launch an Nginx image container, name it Web001, and ex-pose port 8080
externally while mapping to port 80 inside the container. Which of the following commands will
accomplish this task?
A. docker exec ”it -p 8080: 80 ””name Web001 nginx B. docker load -it -p 8080:80 ””name Web001 nginx C. docker run -it -P 8080:80 ””name Web001 nginx D. docker pull -it -p 8080:80 ”name Web00l nginx
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 get”default B. systemct1 daemon”reload C. systemct1 enable postgresq1 D. systemct1 mask postgresq1
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]
Question # 21
A systems administrator checked out the code from the repository, created a new branch, made
changes to the code, and then updated the main branch. The systems administrator wants to ensure
that the Terraform state files do not appear in the main branch. Which of following should the
administrator use to meet this requirement?
A. clone B. gitxgnore C. get D. .ssh
To prevent certain files from being tracked by Git, the administrator can use a .gitignore file (B) in the
repository. The .gitignore file can specify patterns of files or directories that Git should ignore. This
way, the Terraform state files will not appear in the main branch or any other branch. The other
commands are not related to this requirement. Reference:
[CompTIA Linux+ Study Guide], Chapter 10: Working with Git, Section: Ignoring Files with .gitignore
[How to Use .gitignore File]
Question # 22
A user created the following script file:
# ! /bin/bash
# FILENAME: /home/user/ script . sh
echo "hello world"
exit 1
However, when the user tried to run the script file using the command "script . sh, an error returned
indicating permission was denied. Which of the follow-ing should the user execute in
order for the script to run properly?
A. chmod u+x /home/user/script . sh B. chmod 600 /home/user/script . sh C. chmod /home/user/script . sh D. chmod 0+r /horne/user/script. sh
To run a script file, the user needs to have execute permission on the file. The command chmod u+x
/home/user/script.sh (A) will grant execute permission to the owner of the file, which is the user
who created it. The other commands will not give execute permission to the user, and therefore will
not allow the script to run properly. Reference:
[CompTIA Linux+ Study Guide], Chapter 3: Working with Files, Section: Changing File Permissions
[How to Make a Bash Script Executable]
Question # 23
A systems administrator is installing various software packages using a pack-age manager. Which of
the following commands would the administrator use on the Linux server to install the package?
A. winget B. softwareupdate C. yum-config D. apt
Question # 24
A systems administrator wants to check for running containers. Which of the following commands
can be used to show this information?
A. docker pull B. docker stats C. docker ps D. docker list
A new disk was presented to a server as /dev/ sdd. The systems administrator needs to check if a
partition table is on that disk. Which of the following commands can show this information?
A. Isscsi B. fdisk C. blkid D. partprobe
The command that can be used to check if a partition table is on a disk is fdisk. The fdisk command
can display, create, delete, and modify partitions on a disk. To show the partition table of a disk, the
administrator can use fdisk -l /dev/sdd (B). Reference:
[CompTIA Linux+ Study Guide], Chapter 5: Managing Filesystems and Logical Volumes, Section:
Partitioning Disks
[How to Use Fdisk Command in Linux]
Feedback That Matters: Reviews of Our CompTIA XK0-005 Dumps
Vijayent KarAug 15, 2026
Today, I finally got through the CompTIA XK0-005 Linux+ exam. Troubleshooting questions and command-line scenarios were difficult, but MyCertsHub's dumps and practice tests helped a lot with consistent practice. Their material is well-organized and up to date for 2025; it is well worth the money for serious Linux certification seekers!
Johnny GrossAug 14, 2026
I am pleased to announce that I passed my CompTIA XK0-005 exam after studying for weeks! Although MyCertsHub's practice questions helped me master real-world Linux admin tasks, the simulation-based questions were the most difficult. Anyone aiming for a first-time pass is strongly encouraged to use their dumps PDF!
Jonathan RichardsonAug 14, 2026
I recently passed the CompTIA Linux+ XK0-005 exam on my first try! I got the confidence I needed from the MyCertsHub practice tests. System configuration, scripting, and network troubleshooting all received excellent coverage. If you're getting ready, MyCertsHub is the best resource available!