CompTIA XK0-006 Exam Questions
CompTIA Linux+ (Page 9 )

Updated On: 15-May-2026

A systems administrator wants to review the logs from an Apache 2 error.log file in real time and save the information to another file for later review. Which of the following commands should the administrator use?

  1. tail -f /var/log/apache2/error.log > logfile.txt
  2. tail -f /var/log/apache2/error.log | logfile.txt
  3. tail -f /var/log/apache2/error.log >> logfile.txt
  4. tail -f /var/log/apache2/error.log | tee logfile.txt

Answer(s): D

Explanation:

Using tee allows output to be viewed in real time on the terminal while simultaneously writing it to logfile.txt. This meets both requirements: monitoring live updates and saving them for later review.



Which of the following describes the method of consolidating system events to a single location?

  1. Log aggregation
  2. Health checks
  3. Webhooks
  4. Threshold monitoring

Answer(s): A

Explanation:

Log aggregation is the process of collecting and consolidating logs from multiple sources into a single location, making it easier to analyze and manage system events.



A Linux administrator receives reports that an application hosted in a system is not completing tasks in the allocated time. The administrator connects to the system and obtains the following details:



Which of the following actions can the administrator take to help speed up the jobs?

  1. Increase the amount of free memory available to the system.
  2. Increase the amount of CPU resources available to the system.
  3. Increase the amount of swap space available to the system.
  4. Increase the amount of disks available to the system.

Answer(s): B

Explanation:

The uptime output shows a load average of 7.75, 5.72, 5.17 on a system with only 4 processors (nproc = 4).
This indicates CPU saturation since the load averages are significantly higher than the number of available CPUs. Memory and swap usage are minimal, and vmstat shows no I/O waits, so the bottleneck is CPU.
Increasing CPU resources will help speed up the jobs.



A systems administrator receives reports about connection issues to a secure web server. Given the following firewall and web server outputs:



Which of the following commands best resolves this issue?

  1. ufw disable
  2. ufw allow 80/tcp
  3. ufw delete deny https/tcp
  4. ufw allow 4096/tcp

Answer(s): C

Explanation:

The firewall output shows that port 443/tcp (HTTPS) is explicitly denied, even though the web server is correctly listening on it. Removing the deny rule for HTTPS (ufw delete deny https/tcp) resolves the issue while still keeping the firewall active and secure.



An administrator updates the network configuration on a server but wants to ensure the change will not cause an outage if something goes wrong. Which of the following commands allows the administrator to accomplish this goal?

  1. netplan try
  2. netplan rebind
  3. netplan ip
  4. netplan apply

Answer(s): A

Explanation:

netplan try applies the new network configuration temporarily and waits for user confirmation. If not confirmed, it automatically reverts, preventing outages from misconfigurations.



Which of the following best describes journald?

  1. A system service that collects and stores logging data
  2. A feature that creates crash dumps in case of kernel failure
  3. A service responsible for keeping the filesystem journal
  4. A service responsible for writing audit records to a disk

Answer(s): A

Explanation:

journald is part of systemd and is responsible for collecting, storing, and managing log data from various sources such as the kernel, services, and applications.



A Linux administrator wants to add a user to the Docker group without changing their primary group. Which of the following commands should the administrator use to complete this task?

  1. sudo groupmod docker user
  2. sudo usermod -g docker user
  3. sudo usermod -aG docker user
  4. sudo groupmod -G docker user

Answer(s): C

Explanation:

The usermod -aG command appends (-a) the user to a supplementary group (-G) without changing their primary group. This is the correct way to add a user to the docker group.



Which of the following is a characteristic of Python 3?

  1. It is closed source.
  2. It is extensible through modules.
  3. It is fully backwards compatible.
  4. It is binary compatible with Java.

Answer(s): B

Explanation:

Python 3 is open source and supports extensibility through modules and packages, allowing developers to add functionality easily. It is not fully backward compatible with Python 2 and has no binary compatibility with Java.



Viewing page 9 of 19
Viewing questions 65 - 72 out of 141 questions


XK0-006 Exam Discussions & Posts (Share your experience with others)

AI Tutor AI Tutor 👋 I’m here to help!