Arrange the steps to troubleshoot a service that fails to start.
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
LPIC-1 · topic practice
Practise Linux Professional Institute Certification Level 1 LPIC-1 Troubleshooting practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.
Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.
What the exam tests
Troubleshooting questions test whether you can apply the concept in context, not just recognise a definition.
How the topic appears in realistic exam-style scenarios.
Which detail in the question changes the correct answer.
How to eliminate plausible but wrong options.
How to connect the question back to the wider exam objective.
Watch out for
Practice set
14 questions · select your answer, then reveal the explanation
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Trap 1: The network interface is down.
Would affect both commands.
Trap 2: The /etc/hosts file is corrupt.
Corrupt hosts file would affect both similarly.
Trap 3: The DNS server at 8.8.8.8 is not responding.
But dig succeeded, so it is responding.
The network interface is down.
Why wrong: Would affect both commands.
The /etc/hosts file is corrupt.
Why wrong: Corrupt hosts file would affect both similarly.
The DNS server at 8.8.8.8 is not responding.
Why wrong: But dig succeeded, so it is responding.
The /etc/resolv.conf file is misconfigured.
'host' uses local resolver, which may have wrong DNS servers.
Trap 1: The init binary is missing or corrupted.
This error occurs after init is started.
Trap 2: The root filesystem is corrupted and needs fsck.
Corruption would produce a different error, not 'unknown-block'.
Trap 3: The boot loader is not installed correctly.
MBR issues appear before kernel loading.
The init binary is missing or corrupted.
Why wrong: This error occurs after init is started.
The root filesystem is corrupted and needs fsck.
Why wrong: Corruption would produce a different error, not 'unknown-block'.
The kernel lacks the necessary driver for the storage controller.
Kernel cannot access the root device due to missing storage driver.
The boot loader is not installed correctly.
Why wrong: MBR issues appear before kernel loading.
Trap 1: Run 'ldconfig' to update the library cache
ldconfig does not install missing libraries.
Trap 2: Reinstall the 'foo' package using 'rpm -i --force foo.rpm'
Force install may break the system.
Trap 3: Run 'rpm -q --whatrequires libbar.so.2'
Shows packages requiring the library, not providing it.
Run 'ldconfig' to update the library cache
Why wrong: ldconfig does not install missing libraries.
Reinstall the 'foo' package using 'rpm -i --force foo.rpm'
Why wrong: Force install may break the system.
Run 'rpm -q --whatrequires libbar.so.2'
Why wrong: Shows packages requiring the library, not providing it.
Use 'apt-file search libbar.so.2' or 'dnf provides libbar.so.2' to find the package that contains the file
Identifies the package providing the missing library.
Drag a concept onto its matching description — or click a concept then click the description.
Test network connectivity to a host
Display network connections, routing tables, etc.
Capture and analyze network packets
Query DNS for domain name or IP
Configure network interfaces and routing
Trap 1: Use a live CD to run fsck on /dev/md0.
The device /dev/md0 may not be available in the initramfs; fsck cannot be run on an unmountable device.
Trap 2: Check the /etc/fstab file for incorrect root device.
/etc/fstab is only read after the root filesystem is mounted; the error occurs before that.
Trap 3: Reinstall the bootloader on the MBR.
The bootloader is functioning as it loads the kernel; reinstalling it does not address the missing root device.
Use a live CD to run fsck on /dev/md0.
Why wrong: The device /dev/md0 may not be available in the initramfs; fsck cannot be run on an unmountable device.
Rebuild the initramfs to include the mdadm module and the RAID metadata.
Rebuilding the initramfs adds the necessary RAID support, allowing the kernel to assemble and mount /dev/md0.
Check the /etc/fstab file for incorrect root device.
Why wrong: /etc/fstab is only read after the root filesystem is mounted; the error occurs before that.
Reinstall the bootloader on the MBR.
Why wrong: The bootloader is functioning as it loads the kernel; reinstalling it does not address the missing root device.
Trap 1: The script is run with sh instead of bash
HOME is usually set in sh as well.
Trap 2: The script is run with sudo
sudo may preserve HOME depending on configuration, but it's not the most likely cause.
Trap 3: The user has no home directory
All users typically have a home directory.
The script is run with sh instead of bash
Why wrong: HOME is usually set in sh as well.
The script is run with sudo
Why wrong: sudo may preserve HOME depending on configuration, but it's not the most likely cause.
The HOME variable is not exported
Variables must be exported to be available in child processes; interactive shells export HOME, but scripts invoked with ./ may not inherit if the parent shell is non-interactive.
The user has no home directory
Why wrong: All users typically have a home directory.
Trap 1: dpkg -l package
Shows installed version only.
Trap 2: apt-show-versions package
Shows all available versions but not the candidate.
Trap 3: apt-get -s install package
Simulates install, but does not list candidate explicitly.
dpkg -l package
Why wrong: Shows installed version only.
apt-show-versions package
Why wrong: Shows all available versions but not the candidate.
apt-get -s install package
Why wrong: Simulates install, but does not list candidate explicitly.
apt-cache policy package
Shows candidate version and priority.
Trap 1: `dpkg --info curl.deb`
Displays info from a .deb file, not the installed package.
Trap 2: `apt-get check`
Checks for broken dependencies system-wide, not for a specific package.
`dpkg --info curl.deb`
Why wrong: Displays info from a .deb file, not the installed package.
`apt show curl`
Displays package details including dependencies.
`apt-cache depends curl`
Shows the dependency tree of a package.
`dpkg -s curl`
Shows the status and dependencies of the installed package.
`apt-get check`
Why wrong: Checks for broken dependencies system-wide, not for a specific package.
Trap 1: -A INPUT -i lo -j LOG
Logs loopback traffic, does not drop.
Trap 2: -A INPUT -p udp -j ACCEPT
Accepts all UDP, would not block traceroute.
Trap 3: -A INPUT -p tcp --dport 80 -j REJECT
Affects TCP port 80, not traceroute (UDP).
-A INPUT -i lo -j LOG
Why wrong: Logs loopback traffic, does not drop.
-A INPUT -p udp -j ACCEPT
Why wrong: Accepts all UDP, would not block traceroute.
-A INPUT -p tcp --dport 80 -j REJECT
Why wrong: Affects TCP port 80, not traceroute (UDP).
-A INPUT -p icmp --icmp-type port-unreachable -j DROP
Blocks ICMP Port Unreachable, which stops traceroute responses.
Trap 1: ifconfig eth0
Shows IP config, not routing.
Trap 2: ping 192.168.1.1
Pings gateway, but they already know gateway reachable.
Trap 3: arp -n
Shows ARP cache.
route -n
Shows routing table.
ifconfig eth0
Why wrong: Shows IP config, not routing.
ping 192.168.1.1
Why wrong: Pings gateway, but they already know gateway reachable.
arp -n
Why wrong: Shows ARP cache.
Trap 1: Run 'sync; echo 3 > /proc/sys/vm/drop_caches' to clear cache.
Clearing cache frees memory, not disk space.
Trap 2: Remount the /var partition with the 'noatime' option.
noatime reduces metadata updates but does not free space.
Trap 3: Run 'df -i' to check inode usage.
Inode exhaustion is a different issue; space is still consumed by open file handles.
Run 'sync; echo 3 > /proc/sys/vm/drop_caches' to clear cache.
Why wrong: Clearing cache frees memory, not disk space.
Remount the /var partition with the 'noatime' option.
Why wrong: noatime reduces metadata updates but does not free space.
Use 'lsof /var/log' to find processes holding deleted file handles, then restart those processes.
Deleted files remain until all file handles are closed; lsof identifies the processes.
Run 'df -i' to check inode usage.
Why wrong: Inode exhaustion is a different issue; space is still consumed by open file handles.
Trap 1: At the maintenance prompt, run 'fsck /dev/sda2' and answer yes to…
Filesystem is mounted; running fsck on a mounted rw filesystem can cause corruption.
Trap 2: At the maintenance prompt, run 'fsck -y /dev/sda2' to force repair.
Filesystem is still mounted rw.
Trap 3: At the maintenance prompt, run 'fsck -a /dev/sda2' to automatically…
Same issue: filesystem is mounted.
At the maintenance prompt, run 'mount -o remount,ro /dev/sda2 /' then 'fsck -f /dev/sda2' and then 'reboot'.
Correct: remount read-only, then fsck, then reboot.
At the maintenance prompt, run 'fsck /dev/sda2' and answer yes to all prompts.
Why wrong: Filesystem is mounted; running fsck on a mounted rw filesystem can cause corruption.
At the maintenance prompt, run 'fsck -y /dev/sda2' to force repair.
Why wrong: Filesystem is still mounted rw.
At the maintenance prompt, run 'fsck -a /dev/sda2' to automatically repair.
Why wrong: Same issue: filesystem is mounted.
You are a Linux administrator for a company that runs a web server on a system with limited disk space. The web server logs are stored in /var/log/httpd/access_log and grow quickly. The operations team requires that the most recent logs be available for troubleshooting, but logs older than 7 days must be compressed to save space. You decide to implement log rotation using logrotate. The logrotate configuration file for httpd currently contains:
/var/log/httpd/*.log { daily rotate 7 compress delaycompress missingok notifempty sharedscripts postrotate /bin/systemctl reload httpd 2>/dev/null || true endscript
}
After applying this configuration, you notice that log files are being compressed immediately instead of after one rotation. What is the most likely cause and the correct step to fix this?
Trap 1: Remove the 'sharedscripts' directive to ensure the postrotate…
The sharedscripts directive does not affect compression timing; it only controls when the postrotate script runs.
Trap 2: Remove the 'delaycompress' directive to ensure compression occurs…
Removing delaycompress would cause all rotated logs to be compressed immediately, including the most recent, which contradicts the requirement to keep recent logs uncompressed.
Trap 3: Add the 'copytruncate' directive to avoid moving the log file,…
copytruncate does not affect compression timing; it only changes how the log file is rotated.
Remove the 'sharedscripts' directive to ensure the postrotate script runs for each log file individually.
Why wrong: The sharedscripts directive does not affect compression timing; it only controls when the postrotate script runs.
Change the rotation frequency to 'weekly' so that the most recent week's logs remain uncompressed and older logs are compressed.
With weekly rotation, the most recent rotated log (one week old) remains uncompressed due to delaycompress, while older logs are compressed, meeting the requirement of compressing logs older than 7 days.
Remove the 'delaycompress' directive to ensure compression occurs at each rotation.
Why wrong: Removing delaycompress would cause all rotated logs to be compressed immediately, including the most recent, which contradicts the requirement to keep recent logs uncompressed.
Add the 'copytruncate' directive to avoid moving the log file, allowing the web server to continue writing to the same file.
Why wrong: copytruncate does not affect compression timing; it only changes how the log file is rotated.
Free account
Create a free account to save your results and see which topics improve across sessions.
Focused Troubleshooting sessions
Every question in these sessions is drawn from the Troubleshooting domain — nothing else.
Related practice questions
Move into related areas when this topic feels solid.
Practise LPIC-1 questions linked to GNU and Unix Commands.
Practise LPIC-1 questions linked to Devices, Filesystems and FHS.
Practise LPIC-1 questions linked to Linux Installation and Package Management.
Practise LPIC-1 questions linked to Essential System Services and Networking.
Practise LPIC-1 questions linked to Administrative Tasks.
Practise LPIC-1 questions linked to Shells, Scripting and Data Management.
Practise LPIC-1 questions linked to System Architecture.
Practise LPIC-1 questions linked to LPIC-1 fundamentals.
Practise LPIC-1 questions linked to LPIC-1 scenario.
Practise LPIC-1 questions linked to LPIC-1 troubleshooting.
A free account saves results across sessions and highlights which topics need work.
Sign up free