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
- Which input must be given to ifconfig in order to turn on a network interface that was previously inactive? → up
- In which file do you persistently add custom kernel parameters on systemd-based systems using GRUB 2? → /etc/default/grub
- In a bash script, how do you correctly access the third positional argument passed to the script? → $3
- 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.
- How do you stream new journal entries in real time, similar to `tail -f`? → journalctl -f
- What does the parameter expansion `${#myvar}` return in bash? → The length in characters of the string stored in myvar
- 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
- Where should application-specific logrotate configuration files be placed? → /etc/logrotate.d/
- Which rsyslog rule forwards all facility/severity combinations to a remote UDP syslog server at 192.168.1.1? → *.* @192.168.1.1
- What is the key distinction between the `=` operator and `-eq` in bash conditional tests? → `=` compares strings lexicographically and `-eq` compares integers numerically
- What command prints kernel ring buffer messages, often used to diagnose hardware detection during boot? → dmesg
- Which special variable holds the exit status of the most recently executed command? → $?
- Which journalctl option shows entries logged after a specified time, such as 'yesterday' or '2 hours ago'? → --since
- How do you immediately switch to rescue.target on a running system without rebooting? → systemctl isolate rescue.target
- Which kernel parameter boots a systemd system into an emergency shell with only the root filesystem mounted read-only? → systemd.unit=emergency.target
- 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
- Which rsyslog severity level is more critical than 'err' but less critical than 'alert'? → crit
- 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
- In which of the directories can you find man pages that are compliant with the FHS? → /usr/share/man
- Which logrotate directive specifies how many old log file versions to keep? → rotate 4
- What does the `shift` command do when called in a bash script? → Shifts all positional parameters left by one, dropping $1
- Which of the following commands moves and restarts the most recent shell task in the background? → bg
- What does the command substitution syntax $(command) do in a bash script? → Captures the stdout output of a command and inserts it inline
- What command will show the final line of the text file foo.txt? → tail -n 1 foo.txt
- Which journalctl option filters output to only show entries from a specific systemd unit, e.g., sshd.service? → -u / --unit=
- What is the path to the main logrotate configuration file? → /etc/logrotate.conf
- Which bash loop construct iterates over each word in a space-separated list? → for item in list; do ... done
- What is the correct way to assign the string 'admin' to the variable USERNAME in bash? → USERNAME='admin'
- When a process is launched using the nice command, what is the default nice level? → 10
- Where should application-specific rsyslog configuration snippets be placed? → /etc/rsyslog.d/
Turn these facts into recall: