▶ COMPTIA LINUX+ · XK0-005

CompTIA Linux+
Practice Test

// System Admin · DevOps · Cloud Infrastructure // Rontechmedia · PracticeTest360.com //

90
Questions
90
Minutes
720
Pass Score

⚠ Disclaimer

This practice test is provided by Rontechmedia for educational and exam preparation purposes only. This is an unofficial, third-party resource and is not affiliated with, endorsed by, or sponsored by CompTIA®. CompTIA® and Linux+® are registered trademarks of the Computing Technology Industry Association, Inc.

  • Questions are original study materials created for preparation purposes only.
  • Content is based on publicly available CompTIA XK0-005 exam objectives.
  • This test does not guarantee passing the actual CompTIA Linux+ exam.

ℹ Exam Format

  • 90 questions across 4 domains (multiple-choice & performance-based)
  • 90-minute countdown timer — auto-submits on expiry
  • Scoring on 100–900 scale — passing score is 720
  • Instant explanations and real-time domain performance tracking

$ man linux_plus

Comprehensive Study Guide covering all 4 XK0-005 domains available in the Home screen — file systems, user management, systemd, bash scripting, containers, firewalls, SELinux, and troubleshooting.

CompTIA Linux+
XK0-005 Practice Test

Validate your skills in configuring, managing, and troubleshooting Linux environments. Covers system administration, security hardening, bash scripting, containers, and real-world troubleshooting across 90 command-line-focused questions.

90 Minutes
90 Questions
Pass: 720/900
🐧 XK0-005
☁️ Cloud/DevOps Ready
1. System Management
32%
~29 questions
2. Security
21%
~19 questions
3. Scripting, Containers & Automation
19%
~17 questions
4. Troubleshooting
28%
~25 questions

$ man xk0-005 // Study Guide

Full coverage of all four XK0-005 exam domains. Click any domain to expand. Includes key commands, tools, concepts, and exam tips for Linux system administration, security, scripting, containers, and troubleshooting.

32%Domain 1: System Management

The largest domain covers Linux fundamentals: boot process, filesystem hierarchy, package management, storage/partitions, user/group management, networking, services (systemd), and process management. This is core sysadmin territory.

FHS — /etc /var /usr /home /dev /proc /sys
BIOS vs UEFI, GRUB2 bootloader
systemd: systemctl, journalctl, unit files
Package mgmt: apt/dpkg, yum/dnf/rpm
Users & Groups: useradd/usermod/groupadd
File permissions: chmod, chown, umask, ACLs
Disk management: fdisk, parted, mkfs, mount/umount
LVM: pvcreate, vgcreate, lvcreate, lvextend
Networking: ip, nmcli, /etc/network/interfaces
Process management: ps, top, kill, nice, nohup
Cron jobs: crontab -e, /etc/cron.d/
SSH: key-based auth, ssh-keygen, sshd_config
Logging: syslog, rsyslog, journald
NFS, Samba, iSCSI storage

// Exam Tips

  • chmod numeric: 4=read, 2=write, 1=execute. chmod 755 = rwxr-xr-x. chmod 644 = rw-r--r--. SUID=4000, SGID=2000, sticky=1000.
  • systemctl commands: start/stop/restart/reload/enable/disable/status. "enable" = start at boot. journalctl -u servicename -f follows live logs.
  • LVM order: pvcreate (PV) → vgcreate (VG) → lvcreate (LV) → mkfs → mount. Extend: lvextend -L +10G /dev/vg0/lv0 then resize2fs (ext4) or xfs_growfs (xfs).
  • crontab format: minute(0-59) hour(0-23) day(1-31) month(1-12) weekday(0-7) command. "@reboot" runs on startup.
  • /etc/passwd: username:x:UID:GID:GECOS:home:shell. /etc/shadow stores hashed passwords. /etc/group lists group memberships.
21%Domain 2: Security

Covers Linux security hardening: file permissions, SELinux/AppArmor, firewalls (firewalld/iptables/nftables), PKI/certificates, user authentication, auditing, and securing services. Know both defensive configuration and security concepts.

SELinux: enforcing/permissive/disabled, contexts
AppArmor: profiles, aa-status, aa-enforce
firewalld: zones, firewall-cmd, rich rules
iptables / nftables: chains, rules, ACCEPT/DROP
PKI: openssl, certificates, CA, TLS/SSL
PAM: /etc/pam.d/, password complexity
sudo: /etc/sudoers, visudo, NOPASSWD
SSH hardening: PermitRootLogin no, key auth
fail2ban, chroot jails
auditd: audit.rules, ausearch, aureport
File integrity: AIDE, Tripwire
Encryption: LUKS (cryptsetup), GPG

// Exam Tips

  • SELinux modes: Enforcing (blocks & logs), Permissive (logs only, doesn't block), Disabled. getenforce/setenforce. /etc/selinux/config for persistence. restorecon fixes file contexts.
  • firewall-cmd --permanent --add-service=https then --reload to apply. --zone=public --add-port=8080/tcp for ports. Without --permanent, rules vanish after reload.
  • iptables chains: INPUT (incoming), OUTPUT (outgoing), FORWARD (routed). Default policy vs rules. -A appends, -I inserts at top. iptables-save and iptables-restore persist rules.
  • sudo: wheel group in /etc/sudoers grants sudo. "NOPASSWD: ALL" allows passwordless sudo. Always edit with visudo to validate syntax before saving.
  • LUKS: cryptsetup luksFormat /dev/sdX (creates encrypted container) → luksOpen (maps to /dev/mapper/name) → mkfs → mount. /etc/crypttab for persistent auto-mounting.
19%Domain 3: Scripting, Containers & Automation

Covers Bash scripting fundamentals, Git version control, container management with Docker, orchestration concepts (Kubernetes basics), and infrastructure automation. This domain reflects modern DevOps/cloud engineering workflows.

Bash: variables, conditionals, loops, functions
Shell scripting: shebang, exit codes, $?, $#, $@
Regular expressions: grep, sed, awk
Git: init/clone/add/commit/push/pull/branch
Docker: build/run/pull/push/inspect, Dockerfile
Docker networking: bridge, host, overlay
Container storage: volumes, bind mounts
Kubernetes basics: pods, deployments, services
Infrastructure as Code: Ansible basics
Orchestration: docker-compose

// Exam Tips

  • Bash conditionals: if [ condition ]; then ... fi. -f (file exists), -d (dir exists), -z (string empty), -eq (numeric equal), == (string equal). Use [[ ]] for safer comparisons.
  • Exit codes: 0 = success, non-zero = failure. $? holds last exit code. set -e exits script on any error. set -x enables debug tracing.
  • grep -r (recursive), -i (case insensitive), -v (invert), -l (filenames only), -E (extended regex). sed 's/old/new/g' substitutes globally. awk '{print $1}' prints first column.
  • Docker: docker run -d (detached) -p 8080:80 (port map) -v /host:/container (bind mount) --name myapp nginx. docker exec -it container bash enters running container.
  • Dockerfile key instructions: FROM, RUN, COPY, EXPOSE, CMD, ENTRYPOINT, ENV, WORKDIR. CMD is overridable; ENTRYPOINT is not (unless --entrypoint flag used).
28%Domain 4: Troubleshooting

The second largest domain. Covers diagnosing and resolving issues with storage, networking, performance, services, user access, and boot failures. Heavy on command-line diagnostics and interpreting system output.

Boot troubleshooting: rescue mode, GRUB recovery
systemd service failures: journalctl, systemctl status
Disk/storage: df, du, fsck, smartctl, lsblk
Network troubleshooting: ping, traceroute, ss, netstat
DNS: dig, nslookup, /etc/resolv.conf, /etc/hosts
Performance: top, htop, vmstat, iostat, sar
Process issues: strace, lsof, /proc filesystem
Permission errors: ls -la, getfacl, stat
Log analysis: grep in /var/log, journalctl
Memory: free, /proc/meminfo, OOM killer

// Exam Tips

  • df -h shows disk usage by filesystem (human-readable). du -sh /path shows directory size. lsblk shows block device tree. blkid shows UUIDs and filesystem types.
  • ss -tulnp: TCP+UDP, listening only, numeric, show process. Replaces netstat. Check open ports and which process owns them. ss -s shows summary statistics.
  • journalctl flags: -u (unit), -f (follow), -b (current boot), -p err (priority), --since "1 hour ago", -x (with explanations). Essential for systemd service debugging.
  • fsck: run ONLY on unmounted filesystems. Use -y to auto-fix. Boot into single-user mode or use live CD to repair root filesystem. Force check with tune2fs -c 1.
  • Performance triage order: check CPU (top/htop → load average), Memory (free -h → swap usage), Disk I/O (iostat -x → await time), Network (sar -n DEV, ss). High load + low CPU = I/O wait (iowait in top).
QUESTION 1 / 90
SYSTEM MGMT
// Q.001
// explanation

● PASS
820
// scaled score · 100–900 //
Passing Score: 720 | CompTIA Linux+ XK0-005

$ cat answer_review.log

🌐 practicetest360.com
// Practice Test by Rontechmedia · Unofficial Study Resource · Not affiliated with CompTIA //