00:15:00

CompTIA Linux+ Practice Test (XK0-005)

Use the form below to configure your CompTIA Linux+ Practice Test (XK0-005). The practice test can be configured to only include certain exam objectives and domains. You can choose between 5-100 questions and set a time limit.

Logo for CompTIA Linux+ XK0-005
Questions
Number of questions in the practice test
Free users are limited to 20 questions, upgrade to unlimited
Seconds Per Question
Determines how long you have to finish the practice test
Exam Objectives
Which exam objectives should be included in the practice test

CompTIA Linux+ XK0-005 Information

CompTIA Linux+ (XK0-005) Exam

The CompTIA Linux+ (XK0-005) certification is designed for IT professionals who work with Linux systems. It validates skills in system administration, security, scripting, and troubleshooting. This certification is vendor-neutral, covering multiple distributions such as Ubuntu, CentOS, and Red Hat.

Exam Overview

The XK0-005 exam consists of a maximum of 90 questions, including multiple-choice and performance-based questions. Candidates have 90 minutes to complete the test. The exam costs $358 USD. A passing score is 720 on a scale of 100 to 900. The certification is valid for three years and can be renewed through CompTIA’s continuing education program.

Exam Content

The XK0-005 exam focuses on five main domains: system management, security, scripting and automation, troubleshooting, and Linux fundamentals. System management includes package management, system monitoring, and user administration. Security covers permissions, authentication, and encryption. Scripting and automation focus on Bash scripting and task automation. Troubleshooting tests problem-solving skills for system failures and performance issues. Linux fundamentals include file system hierarchy, networking, and command-line operations.

Who Should Take This Exam?

The CompTIA Linux+ certification is ideal for system administrators, Linux support technicians, and DevOps professionals. It is recommended for individuals with at least one year of Linux experience. This certification is beneficial for IT professionals working with servers, cloud infrastructure, and cybersecurity.

How to Prepare

Candidates should review the official CompTIA Linux+ Exam Objectives and study materials provided by CompTIA. Hands-on experience with Linux systems is essential. Practice exams can help assess readiness and identify weak areas. Using Linux in a lab or virtual environment can provide practical experience with commands, system configuration, and troubleshooting.

Summary

The CompTIA Linux+ (XK0-005) certification is a valuable credential for IT professionals working with Linux systems. It validates essential skills in system administration, security, and automation. This certification is ideal for those managing Linux-based environments in IT infrastructure, cybersecurity, and cloud computing.

Free CompTIA Linux+ XK0-005 Practice Test

Press start when you are ready, or press Change to modify any settings for the practice test.

  • Questions: 15
  • Time: Unlimited
  • Included Topics:
    System Management
    Security
    Scripting, Containers, and Automation
    Troubleshooting
Question 1 of 15

A system administrator needs to write a shell script that will output 'Large file detected' if a specified file size exceeds 1024 kilobytes. Which of the following shell script code blocks is the BEST to accomplish this?

  • You selected this option

    if [ $(stat -c%s "file.txt") -gt 1048576 ]; then echo 'Large file detected'; fi

  • You selected this option

    if [ $(stat -c%s "file.txt") / 1024 -gt 1024 ]; then echo 'Large file detected'; fi

  • You selected this option

    if [ $(stat -c%s "file.txt") -gt 1024 ]; then echo 'Large file detected'; fi

  • You selected this option

    if [[ $(stat -c%s "file.txt") -gt 1024 ]]; then echo 'Large file detected'; fi

Question 2 of 15

What command is used to reconfigure the time zone on a Linux system?

  • You selected this option

    timezone

  • You selected this option

    date --set-timezone

  • You selected this option

    tzconfig

  • You selected this option

    timedatectl set-timezone

Question 3 of 15

When a container is set to use the host networking mode, it will share the networking namespace with the host machine allowing the container to listen on the host's IP address.

  • You selected this option

    False

  • You selected this option

    True

Question 4 of 15

Your server has a web application that should be accessible from the internet, but users report they are unable to connect. You have confirmed that the web server is running and that network connectivity is established. What should you check next to ensure that the firewall is not blocking the web application's traffic?

  • You selected this option

    Check the listening ports to ensure the server is listening on the correct interface.

  • You selected this option

    Verify that the firewall rules allow traffic on ports 80 (HTTP) and 443 (HTTPS).

  • You selected this option

    Use a network scanner to detect open ports on the server.

  • You selected this option

    Restart the web server service to ensure it is not a service issue.

Question 5 of 15

A system administrator notices that an important server is experiencing intermittent problems with data integrity, and suspects filesystem corruption on one of its disks. After running fsck on the unmounted filesystem and fixing several errors, the administrator needs to ensure that the filesystem will be checked and repaired if necessary during the next system boot. Which of the following commands should the administrator use to schedule a filesystem check on boot?

  • You selected this option

    e2fsck -p /dev/sda1

  • You selected this option

    tune2fs -c 1 /dev/sda1

  • You selected this option

    tune2fs -C 0 /dev/sda1

  • You selected this option

    tune2fs -i 0 /dev/sda1

Question 6 of 15

A system administrator is configuring a systemd timer unit to start a backup service exactly 10 minutes after the system has finished booting. Which line should be included in the [Timer] section of the timer unit file?

  • You selected this option

    OnActiveSec=10min

  • You selected this option

    StartupSec=10min

  • You selected this option

    OnUnitInactiveSec=10min

  • You selected this option

    OnCalendar=*:0/10

  • You selected this option

    OnUnitActiveSec=10min

  • You selected this option

    OnBootSec=10min

Question 7 of 15

Which command would you use to create a new container from an existing image and start it immediately?

  • You selected this option

    docker create

  • You selected this option

    docker build

  • You selected this option

    docker commit

  • You selected this option

    docker run

Question 8 of 15

Your company requires remote system administrators to authenticate using a method more secure than passwords alone when accessing critical Linux servers. Which of the following options provides an additional layer of security that requires something the user has, in addition to something the user knows?

  • You selected this option

    Implementing a strict password strength and rotation policy

  • You selected this option

    Using a one-time password (OTP) token in conjunction with their user password

  • You selected this option

    Employing biometric authentication such as fingerprint or facial recognition

  • You selected this option

    Requiring administrators to connect using SSH keys

Question 9 of 15

When configuring a Docker container's network, which option allows you to create a dedicated subnet where containers can be attached, providing isolation from other containers on the same host?

  • You selected this option

    MACVLAN network

  • You selected this option

    User-defined bridge network

  • You selected this option

    Host mode networking

  • You selected this option

    Default bridge network

  • You selected this option

    None (network disabled)

  • You selected this option

    Overlay network

Question 10 of 15

A system administrator has noticed that over time, a Linux server's available memory decreases, even when the workload on the server remains consistent. The 'top' command shows a particular process gradually increasing its memory usage without releasing it back to the system. Which of the following tools should the administrator use to further investigate this suspected memory leak in the problematic process?

  • You selected this option

    vmstat

  • You selected this option

    valgrind

  • You selected this option

    free

  • You selected this option

    mpstat

Question 11 of 15

The command xargs can be used to apply a single command to each line of input it receives.

  • You selected this option

    True

  • You selected this option

    False

Question 12 of 15

A team member has made several updates to files in a local Git repository. To prepare for the next commit, the team member wants to stage a specific file called update.txt that has been modified along with various other files. Which command should the team member use to stage only the changes in update.txt?

  • You selected this option

    git add update.txt

  • You selected this option

    git commit update.txt

  • You selected this option

    git add .

  • You selected this option

    git push update.txt

Question 13 of 15

What command would you use to display all the currently running container instances in the system?

  • You selected this option

    docker list

  • You selected this option

    docker running

  • You selected this option

    docker inspect

  • You selected this option

    docker ps

Question 14 of 15

An administrator is writing a shell script where the output of a command needs to be both displayed on the screen and written to a file for logging purposes. Which command and operator should the administrator use to achieve this?

  • You selected this option

    Using the tee command with the | operator

  • You selected this option

    Redirecting output using the > operator

  • You selected this option

    Piping the output to another command with the | operator

  • You selected this option

    Appending the output to a file using the >> operator

Question 15 of 15

A system administrator needs to verify the SSL certificate information of a web server at the domain 'example.com' running on the default HTTPS port. Which command should be used to retrieve and display the certificate details?

  • You selected this option

    openssl s_client -verify example.com

  • You selected this option

    openssl s_server -connect example.com:443

  • You selected this option

    openssl s_client -connect example.com:443 -cert

  • You selected this option

    openssl s_client -host example.com -port 443

  • You selected this option

    openssl s_client -connect example.com:443 -showcerts

  • You selected this option

    openssl s_client -tls1_2 -connect example.com:443