CompTIA Linux+ Practice Questions: System Management

36 free, exam-style CompTIA Linux+ (XK0-006) practice questions covering System Management, each with the correct answer and an explanation. Start a timed exam below, or scroll on to read through the questions.

🧠

Mini Exam

25 Questions · 50 minutes

Start Quiz 🚀
🏆

Mock Linux+ Exam

85 Questions · 165 minutes

Start Quiz 🚀
📅

Daily Quiz

10 Questions · 20 minutes

Start Quiz 🚀
🎯

Standard Practice

50 Questions · 100 minutes

Start Quiz 🚀

System Management practice questions

Answers and explanations are shown. Take the timed exam above to test yourself first.

Q1. Which directory contains systemd unit files?

  • A./etc/systemd
  • B./lib/systemd
  • C./usr/lib/systemd
  • D.All of the above✓ Correct
Explanation: systemd looks for units in multiple directories with /etc taking precedence. Learn more.

Q2. What does 'systemctl isolate multi-user.target' do?

  • A.Reboot system
  • B.Enter rescue mode
  • C.Switch to non-graphical mode✓ Correct
  • D.Shutdown services
Explanation: Changes system state to multi-user (non-GUI) target. Learn more.

Q3. What is the purpose of 'make modules_install' during kernel compilation?

  • A.Compile kernel source
  • B.Install kernel modules✓ Correct
  • C.Update bootloader
  • D.Configure kernel options
Explanation: Installs compiled modules to /lib/modules/<version>/. Learn more.

Q4. Which command shows kernel module dependencies?

  • A.lsmod✓ Correct
  • B.modinfo
  • C.depmod
  • D.modprobe
Explanation: lsmod displays loaded modules and dependencies. Learn more.

Q5. Which command refreshes systemd configuration?

  • A.systemctl reload
  • B.systemctl daemon-reload✓ Correct
  • C.systemctl restart
  • D.systemctl reexec
Explanation: daemon-reload reloads unit files after modification. Learn more.

Q6. What does 'chroot' do?

  • A.Change root password
  • B.Modify process root directory✓ Correct
  • C.Check disk usage
  • D.Repair filesystem
Explanation: chroot jail confines processes to a specific directory tree. Learn more.

Q7. Which directory holds temporary systemd mount units?

  • A./etc/systemd/system
  • B./run/systemd/system✓ Correct
  • C./usr/lib/systemd/system
  • D./var/lib/systemd
Explanation: /run contains transient runtime configuration. Learn more.

Q8. What is the purpose of 'at' command?

  • A.Schedule recurring jobs
  • B.Run commands once at a specific time✓ Correct
  • C.List users
  • D.Monitor system activity
Explanation: at executes commands once at a specified time. Learn more.

Q9. Which directory contains udev rules?

  • A./etc/udev/rules.d✓ Correct
  • B./lib/udev
  • C./run/udev
  • D./var/lib/udev
Explanation: Custom udev rules go in /etc/udev/rules.d/*.rules. Learn more.

Q10. What is the purpose of /etc/aliases?

  • A.Email alias mapping✓ Correct
  • B.Command aliases
  • C.Network aliases
  • D.User alias groups
Explanation: Used by sendmail/postfix for email forwarding. Learn more.

Q11. Which file defines cron jobs for all users?

  • A./etc/crontab✓ Correct
  • B./etc/cron.d/
  • C./var/spool/cron/
  • D./etc/anacrontab
Explanation: /etc/crontab is the system-wide crontab file. Learn more.

Q12. Which directory contains kernel header files?

  • A./usr/src/linux-headers-*✓ Correct
  • B./lib/modules
  • C./boot
  • D./etc/kernel
Explanation: Header files needed for compiling kernel modules. Learn more.

Q13. Which command shows GRUB menu during boot?

  • A.Hold Shift✓ Correct
  • B.Press Ctrl+C
  • C.Type 'grub'
  • D.Press F12
Explanation: Shift shows GRUB menu on UEFI systems; Esc on BIOS. Learn more.

Q14. Which file defines default runlevel in SysV init?

  • A./etc/inittab✓ Correct
  • B./etc/init.d
  • C./etc/rc.local
  • D./etc/runlevel
Explanation: inittab specifies default runlevel (replaced by systemd targets). Learn more.

Q15. What does 'ulimit -a' display?

  • A.All user limits✓ Correct
  • B.ARP table
  • C.Active users
  • D.Available memory
Explanation: Shows resource limits (CPU, memory, processes, etc.). Learn more.

Q16. Which file defines default GRUB boot parameters?

  • A./boot/grub/grub.cfg
  • B./etc/default/grub✓ Correct
  • C./etc/grub.d/
  • D./proc/cmdline
Explanation: /etc/default/grub is modified then grub-mkconfig generates grub.cfg. Learn more.

Q17. What does 'systemctl mask' do?

  • A.Disable service
  • B.Hide service logs
  • C.Encrypt service config
  • D.Prevent service from starting✓ Correct
Explanation: mask prevents accidental service activation via symlink to /dev/null. Learn more.

Q18. Which command lists all cron jobs for the current user?

  • A.crontab -l✓ Correct
  • B.cron list
  • C.cat /etc/crontab
  • D.ls /var/spool/cron
Explanation: crontab -l displays user's scheduled jobs. Learn more.

Q19. What is the purpose of the 'ldconfig' command?

  • A.Configure LDAP
  • B.Rebuild shared library cache✓ Correct
  • C.List disk configurations
  • D.Load kernel modules
Explanation: ldconfig updates links and cache for shared libraries. Learn more.

Q20. Which directory contains initramfs images?

  • A./boot✓ Correct
  • B./etc/initramfs
  • C./lib/initramfs
  • D./var/lib/initramfs
Explanation: initramfs stored in /boot with kernel images. Learn more.

Q21. Which command lists loaded kernel modules?

  • A.lsmod✓ Correct
  • B.modprobe
  • C.insmod
  • D.depmod
Explanation: lsmod shows currently loaded modules. Learn more.

Q22. What does 'systemctl enable' do?

  • A.Start service now
  • B.Enable auto-start at boot✓ Correct
  • C.Reload service config
  • D.Show service status
Explanation: Enables service to start at boot time. Learn more.

Q23. Which directory contains kernel modules?

  • A./lib/modules✓ Correct
  • B./etc/kernel
  • C./usr/src/linux
  • D./boot
Explanation: Modules stored in /lib/modules/<kernel-version>/. Learn more.

Q24. Which directory contains udev device rules?

  • A./etc/udev/rules.d✓ Correct
  • B./lib/udev
  • C./run/udev
  • D./usr/share/udev
Explanation: Custom udev rules go in /etc/udev/rules.d/*.rules. Learn more.

Q25. Which file defines NTP servers for chronyd?

  • A./etc/chrony.conf✓ Correct
  • B./etc/ntp.conf
  • C./etc/systemd/timesyncd.conf
  • D./etc/ntp.drift
Explanation: chronyd uses chrony.conf for NTP configuration. Learn more.

Q26. What is the purpose of 'systemd-inhibit'?

  • A.Prevent system sleep during operations✓ Correct
  • B.Block user logins
  • C.Disable services
  • D.Encrypt systemd journals
Explanation: Temporarily inhibits power/sleep states. Learn more.

Q27. Which file defines keyboard layout settings?

  • A./etc/vconsole.conf
  • B./etc/X11/xorg.conf
  • C./etc/default/keyboard
  • D.All of the above✓ Correct
Explanation: Multiple files control keyboard settings depending on environment. Learn more.

Q28. What does 'grub2-mkconfig -o /boot/grub2/grub.cfg' do?

  • A.Backup GRUB config
  • B.Generate new GRUB config✓ Correct
  • C.Overwrite kernel parameters
  • D.Install GRUB bootloader
Explanation: Rebuilds GRUB configuration file from templates. Learn more.

Q29. Which systemd command shows failed units?

  • A.systemctl --failed✓ Correct
  • B.journalctl --vacuum
  • C.useradd -m
  • D.ip route add
Explanation: systemctl --failed lists units that are currently in a failed state. Learn more.

Q30. Which systemd target is comparable to a multi-user text mode without a graphical interface?

  • A.multi-user.target✓ Correct
  • B.graphical.target
  • C.rescue.target only
  • D.poweroff.target
Explanation: multi-user.target provides multi-user services without requiring a graphical desktop. Learn more.

Q31. Which command creates a new user with a home directory on many Linux distributions?

  • A.useradd -m username✓ Correct
  • B.chmod -m username
  • C.grep -m username
  • D.mkfs -m username
Explanation: useradd -m creates a user and home directory on systems where useradd is used directly. Learn more.

Q32. Which command displays loaded kernel modules?

  • A.lsmod✓ Correct
  • B.lsblk
  • C.lscpu
  • D.lsusb only
Explanation: lsmod lists modules currently loaded into the Linux kernel. Learn more.

Q33. Which systemd command enables a service to start automatically at boot?

  • A.systemctl enable service✓ Correct
  • B.systemctl mask service only
  • C.journalctl -u service
  • D.hostnamectl set-hostname service
Explanation: systemctl enable creates the boot-time links needed for a service to start automatically. Learn more.

Q34. Which command displays CPU architecture and model details?

  • A.lscpu✓ Correct
  • B.lsmem -d
  • C.free -c
  • D.uname -p only
Explanation: lscpu displays CPU architecture, cores, threads, and model information. Learn more.

Q35. Which command rebuilds an initramfs image on many RPM-based Linux distributions?

  • A.ldconfig -f
  • B.depmod --unload
  • C.systemctl preset-all
  • D.dracut -f✓ Correct
Explanation: dracut creates initramfs images, and -f overwrites the existing image when drivers or early-boot configuration change. Learn more.

Q36. Which command loads a kernel module and automatically resolves its module dependencies?

  • A.insmod --nodeps MODULE
  • B.lsmod MODULE
  • C.sysctl -p MODULE
  • D.modprobe MODULE✓ Correct
Explanation: modprobe uses the module dependency database to load the requested module and any required dependencies. Learn more.

More CompTIA Linux+ practice topics

Keep studying CompTIA Linux+

Full CompTIA Linux+ practice exam · CompTIA Linux+ study guide · All CompTIA practice questions

Last updated