LFCS Certification Cheat Sheet 2026

The 30 highest-yield LFCS Certification facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

20 questions
120 min time limit
67% to pass
  1. Which input must be given to ifconfig in order to turn on a network interface that was previously inactive? up
  2. In which file do you persistently add custom kernel parameters on systemd-based systems using GRUB 2? /etc/default/grub
  3. In a bash script, how do you correctly access the third positional argument passed to the script? $3
  4. Which of the following is a key advantage of using a high-level package manager like `dnf` or `apt` compared to a low-level tool like `rpm` or `dpkg`? They automatically resolve and install required software dependencies from repositories.
  5. How do you stream new journal entries in real time, similar to `tail -f`? journalctl -f
  6. What does the parameter expansion `${#myvar}` return in bash? The length in characters of the string stored in myvar
  7. After chrooting into /sysroot to reset the root password on an SELinux system, which command ensures file contexts are relabeled on next boot? touch /.autorelabel
  8. Where should application-specific logrotate configuration files be placed? /etc/logrotate.d/
  9. Which rsyslog rule forwards all facility/severity combinations to a remote UDP syslog server at 192.168.1.1? *.* @192.168.1.1
  10. What is the key distinction between the `=` operator and `-eq` in bash conditional tests? `=` compares strings lexicographically and `-eq` compares integers numerically
  11. What command prints kernel ring buffer messages, often used to diagnose hardware detection during boot? dmesg
  12. Which special variable holds the exit status of the most recently executed command? $?
  13. Which journalctl option shows entries logged after a specified time, such as 'yesterday' or '2 hours ago'? --since
  14. How do you immediately switch to rescue.target on a running system without rebooting? systemctl isolate rescue.target
  15. Which kernel parameter boots a systemd system into an emergency shell with only the root filesystem mounted read-only? systemd.unit=emergency.target
  16. What is the effect of adding `set -e` at the top of a bash script? Causes the script to exit immediately when any command returns a non-zero status
  17. Which rsyslog severity level is more critical than 'err' but less critical than 'alert'? crit
  18. What is the purpose of the shebang line (e.g., #!/bin/bash) at the top of a shell script? It specifies the interpreter to use when executing the script
  19. In which of the directories can you find man pages that are compliant with the FHS? /usr/share/man
  20. Which logrotate directive specifies how many old log file versions to keep? rotate 4
  21. What does the `shift` command do when called in a bash script? Shifts all positional parameters left by one, dropping $1
  22. Which of the following commands moves and restarts the most recent shell task in the background? bg
  23. What does the command substitution syntax $(command) do in a bash script? Captures the stdout output of a command and inserts it inline
  24. What command will show the final line of the text file foo.txt? tail -n 1 foo.txt
  25. Which journalctl option filters output to only show entries from a specific systemd unit, e.g., sshd.service? -u / --unit=
  26. What is the path to the main logrotate configuration file? /etc/logrotate.conf
  27. Which bash loop construct iterates over each word in a space-separated list? for item in list; do ... done
  28. What is the correct way to assign the string 'admin' to the variable USERNAME in bash? USERNAME='admin'
  29. When a process is launched using the nice command, what is the default nice level? 10
  30. Where should application-specific rsyslog configuration snippets be placed? /etc/rsyslog.d/