Courseiva
Back to CompTIA Linux+ (XK0-006) questions

Scenario-based practice

Refer to the Exhibit Practice Questions

Practise CompTIA Linux+ (XK0-006) practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

15
scenario questions
XK0-006
exam code
CompTIA
vendor

Scenario guide

How to approach refer to the exhibit practice questions

Practise exhibit-style questions that ask you to read a topology, table, command output or diagram before choosing the best answer.

Quick answer

Exhibit-style questions test whether you can read a topology, command output, diagram or table before choosing the best answer.

How to extract the relevant detail from an exhibit.

How topology, command output or routing information affects the answer.

How to avoid answering from memory before reading the evidence.

How to map the exhibit back to the exam objective.

Related practice questions

Related XK0-006 topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1hardmultiple choice
Full question →

Refer to the exhibit. A web server is experiencing performance issues. Based on the process list shown, which action should the administrator take first?

Exhibit

ps aux | grep apache
root      1234  0.0  0.1  12345  6789 ?        Ss   10:00   0:00 /usr/sbin/httpd -k start
apache    1235  0.2  2.3  45678 23456 ?        S    10:00   0:05 /usr/sbin/httpd -k start
apache    1236  0.3  2.4  45678 24000 ?        S    10:00   0:06 /usr/sbin/httpd -k start
apache    1237  0.0  0.1     0     0 ?        Z    10:05   0:00 [httpd] <defunct>

# cat /proc/sys/kernel/pid_max
32768
Question 2easymultiple choice
Full question →

An administrator needs to add a script to be executed daily. The script is placed at /etc/cron.daily/myscript. After placing the script, it does not run. Based on the exhibit, what is the most likely issue?

Exhibit

Refer to the exhibit.
```
$ ls -l /etc/cron.daily/
total 8
-rwxr-xr-x 1 root root 245 Mar 10 10:00 logrotate
-rwxr-xr-x 1 root root 123 Mar 10 10:00 syscheck
```
Question 3mediummultiple choice
Full question →

Refer to the exhibit. What is the total amount of RAM installed on the system?

Exhibit

Output of 'free -h':
              total        used        free      shared  buff/cache   available
Mem:           7.7G        7.5G        0.1G        0.0G        0.1G        0.1G
Swap:          2.0G        1.2G        0.8G
Question 4mediummultiple choice
Full question →

Refer to the exhibit. A web application running under Apache cannot write to /var/log/app.log. The file has permissions 664 and is owned by apache. What is the correct action to allow writes while maintaining SELinux policies?

Exhibit

Refer to the exhibit.
```
type=AVC msg=audit(1234567890.123:45): avc: denied { write } for pid=1234 comm="httpd" name="app.log" dev=sda1 ino=56789 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_log_t:s0 tclass=file
```
Question 5hardmultiple choice
Full question →

Based on the exhibit, what is the most likely cause of the sshd service failure?

Exhibit

Refer to the exhibit.

# systemctl status sshd
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2023-10-23 14:30:01 UTC; 5min ago
     Docs: man:sshd(8)
           man:sshd_config(5)
  Process: 1234 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)
 Main PID: 1234 (code=exited, status=255)

Oct 23 14:30:01 server sshd[1234]: fatal: Cannot bind to port 22: Address already in use
Question 6mediummultiple choice
Full question →

Refer to the exhibit. A system administrator notices that backend1.example.com is receiving significantly more traffic than the other two servers. What is the most likely reason?

Exhibit

# /etc/nginx/nginx.conf (partial)
http {
    upstream backend {
        server backend1.example.com weight=5;
        server backend2.example.com weight=3;
        server backend3.example.com weight=2;
    }
    server {
        listen 80;
        location / {
            proxy_pass http://backend;
            proxy_next_upstream error timeout invalid_header http_500 http_502;
        }
    }
}
Question 7hardmultiple choice
Full question →

Refer to the exhibit. A system administrator notices that the SSH service has failed. What is the most likely cause?

Network Topology
$ journalctl -u sshd.serviceno-pager$ systemctl status sshd.serviceLoaded: loaded (/usr/lib/systemd/system/sshd.serviceenabledvendor preset: enabled)5min agoDocs: man:sshd(8) man:sshd_config(5)Main PID: 1234 (code=exited, status=255)

Refer to the exhibit. A Linux administrator needs to capture all messages with priority 'alert' from the kernel facility. Which directive should be added to /etc/rsyslog.conf?

Exhibit

$ cat /etc/rsyslog.conf | grep -E '^\.|^\*'\n*.info;mail.none;authpriv.none;cron.none                /var/log/messages\nauthpriv.*                                              /var/log/secure\nmail.*                                                  -/var/log/maillog\ncron.*                                                  /var/log/cron\n*.emerg                                                 :omusrmsg:*\nuucp,news.crit                                          /var/log/spooler\nlocal7.*                                                /var/log/boot.log
Question 9hardmultiple choice
Full question →

Refer to the exhibit. An administrator has configured audit rules but notices that 'auditctl -l' returns 'No rules'. What is the most likely issue?

Exhibit

$ cat /etc/audit/audit.rules
-D
-b 8192
-f 1
-e 1

$ auditctl -l
No rules
$ systemctl status auditd
● auditd.service - Security Auditing Service
   Loaded: loaded (/usr/lib/systemd/system/auditd.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2023-03-20 10:20:00 UTC; 1h 30min ago
     Docs: man:auditd(8)
           https://github.com/linux-audit/audit-documentation
  Process: 1234 ExecStart=/sbin/auditd (code=exited, status=0/SUCCESS)
 Main PID: 1235 (auditd)
    Tasks: 2 (limit: 1234)
   Memory: 1.2M
   CGroup: /system.slice/auditd.service
           └─1235 /sbin/auditd

$ auditctl -s
AUDIT_STATUS: enabled=1 flag=1 pid=1235 rate_limit=0 backlog_limit=8192 lost=0 backlog=0 backlog_wait_time=15000
Question 10hardmultiple choice
Full question →

Refer to the exhibit. A system administrator checks the status of the SSH service and sees the output shown. What is the most likely cause of the failure?

Exhibit

systemctl status sshd
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2023-03-13 09:15:23 UTC; 2min 47s ago
     Docs: man:sshd(8)
           man:sshd_config(5)
  Process: 1234 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)
 Main PID: 1234 (code=exited, status=255)
   Status: "Failed to start sshd: Address already in use"
Question 11mediummultiple choice
Full question →

Refer to the exhibit. Users report they cannot SSH to the server. Based on the logs, what is the most likely cause?

Exhibit

systemctl status sshd.service
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2025-03-10 10:30:25 UTC; 2h 15min ago
 Main PID: 1234 (sshd)
   CGroup: /system.slice/sshd.service
           └─1234 /usr/sbin/sshd -D

journalctl -u sshd.service -p err --since "1 hour ago"
Mar 10 12:35:01 server sshd[5678]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
Mar 10 12:35:01 server sshd[5678]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Mar 10 12:35:01 server sshd[5678]: fatal: No supported key exchange algorithms [preauth]
Question 12hardmultiple choice
Full question →

The system is a web server running Apache and MySQL. Based on the exhibit, which of the following is the most likely cause of the full disk?

Exhibit

Refer to the exhibit.
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        50G   50G     0 100% /
Question 13hardmultiple choice
Full question →

Refer to the exhibit. A system administrator notices that /var/log is nearly full. Which configuration change would resolve the issue and prevent recurrence?

Network Topology
-rw-rr# df -h /var/log# ls -la /var/log/messages*# cat /etc/logrotate.d/syslog/var/log/messagesrotate 4size 100Mmissingokcompresspostrotate/usr/bin/systemctl restart syslog.serviceendscript
Question 14hardmultiple choice
Full question →

Refer to the exhibit. An administrator attempts to mount all filesystems and receives an error. What is the most likely cause?

Exhibit

# cat /etc/fstab
UUID=1234-5678 / ext4 defaults 1 1
UUID=abcd-ef01 /boot ext4 defaults 1 2
UUID=9012-3456 /home xfs defaults 0 0
UUID=7890-1234 /var ext4 defaults 1 2

# mount -a
mount: /var: mount point does not exist.

# ls -ld /var
ls: cannot access '/var': No such file or directory
Question 15hardmultiple choice
Full question →

Refer to the exhibit. A backup script fails every 5 minutes. Which is the most likely cause?

Exhibit

# crontab -l
*/5 * * * * /usr/local/bin/backup.sh
# Log excerpt:
Mar 10 12:35:01 server CROND[12345]: (root) CMD (/usr/local/bin/backup.sh)
Mar 10 12:35:03 server backup.sh[12346]: Error: Permission denied writing to /mnt/backup/backup.tar.gz
Mar 10 12:35:03 server backup.sh[12346]: rsync: failed to set permissions on "/mnt/backup/backup.tar.gz": Operation not permitted (1)
Mar 10 12:35:03 server backup.sh[12346]: rsync error: some files/attrs were not transferred (code 23) at main.c(1865) [generator=3.2.3]

These XK0-006 practice questions are part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style XK0-006 questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.