Courseiva
← Back to Linux Foundation Certified System Administrator LFCS questions

Scenario-based practice

Hard Difficulty Questions

Practise Linux Foundation Certified System Administrator LFCS practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

20
scenario questions
LFCS
exam code
Linux Foundation
vendor

Scenario guide

How to approach hard difficulty questions

These are the questions most candidates get wrong. They require connecting multiple concepts, reading tricky output, or knowing edge-case behaviour that isn't on most study cards. Practising them trains you to operate under uncertainty — a necessary skill on the real exam.

Quick answer

Hard Difficulty Questions 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.

Related practice questions

Related LFCS topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1hardmultiple choice
Full question →

After deleting user 'alice', the system administrator wants to also remove the home directory and mail spool. Which command should be used?

Question 2hardmultiple choice
Full question →

An administrator needs to set up a shared directory /project for the group 'projectteam' (GID 5000). All members of the group should be able to create and delete files, but only the file owner can modify their own files. The directory should also ensure that new files inherit the group ownership. Which set of commands achieves this?

Question 3hardmulti select
Full question →

Which THREE of the following are valid methods to temporarily switch to a different user account without logging out entirely? (Choose three.)

Question 4hardmultiple choice
Full question →

A system administrator needs to find all files in /home that are owned by user 'alice' and have been modified in the last 7 days. The administrator then wants to compress those files into a single archive named alice_recent.tar.gz. Which of the following commands accomplishes this?

Question 5hardmultiple choice
Full question →

A system administrator needs to replace all occurrences of 'oldhost' with 'newhost' in /etc/hosts, but only on lines that contain the string 'domain'. Which sed command accomplishes this?

Question 6hardmultiple choice
Full question →

After running 'chage -l bob', the output shows: 'Last password change: Apr 01, 2023', 'Password expires: May 31, 2023', 'Account expires: Jul 15, 2023'. What will happen on May 31, 2023?

Question 7hardmultiple choice
Full question →

An administrator notices that the system clock is drifting significantly. To synchronize time using NTP, which command should be used to immediately sync with a server?

Question 8hardmulti select
Full question →

Which THREE of the following statements about the user private group (UPG) scheme are true?

Question 9hardmultiple choice
Full question →

The backup script fails to run as user 'backup' with sudo. What is the issue?

Exhibit

Refer to the exhibit.

$ ls -l /usr/local/bin/backup.sh
-rwx------ 1 root root 1024 Jan  1 12:00 /usr/local/bin/backup.sh

$ sudo -u backup /usr/local/bin/backup.sh
sudo: unable to execute /usr/local/bin/backup.sh: Permission denied

$ id backup
uid=1003(backup) gid=1003(backup) groups=1003(backup)
Question 10hardmultiple choice
Full question →

A developer needs to extract the third column from a CSV file where columns are separated by commas, but some fields contain commas within double quotes. Which command correctly handles this?

Question 11hardmultiple choice
Full question →

A system administrator needs to schedule a one-time task that will run at 2:30 AM on July 15. Which command should be used to create this job?

Question 12hardmultiple choice
Review the full routing breakdown →

An administrator is configuring a bridge using iproute2. Which command correctly attaches eth0 to bridge br0?

Question 13hardmultiple choice
Full question →

A security policy requires that all users in the 'admin' group must have a umask of 027 set automatically upon login. An administrator adds 'umask 027' to /etc/profile. However, users report that the umask is still 022. What is a likely cause?

Question 14hardmultiple choice
Full question →

A systems administrator needs to add a new user 'jdoe' with a home directory in /export/home, a UID of 1500, and an expiry date of 2025-12-31. Which command should they use?

Question 15hardmultiple choice
Full question →

You are a system administrator for a company that runs a web server on a Linux system. The web server logs are stored in /var/log/nginx/access.log. The log file grows rapidly and rotates weekly via logrotate. The system has been running for several months. Recently, the development team reported that the web server is responding slowly. You suspect that the disk I/O might be high due to log file activity. You check the disk usage and find that /var/log/nginx/access.log is 4 GB, and the rotated logs (access.log.1.gz, access.log.2.gz, etc.) total another 10 GB. The /var partition has 20 GB total, so it's 70% full. You decide to reduce the disk usage by compressing the current log file and truncating it without stopping the nginx service. Which command sequence should you use to safely achieve this?

Question 16hardmultiple choice
Full question →

A service unit has the directive 'ExecStartPre=/bin/true' and 'ExecStart=/usr/bin/myapp'. What is the effect of ExecStartPre?

Question 17hardmulti select
Full question →

An administrator wants to find all files larger than 100MB in the /home directory. Which two commands or command sequences achieve this? (Choose two.)

Question 18hardmultiple choice
Full question →

Based on the journalctl output, what is the most likely cause of the service failure?

Exhibit

Refer to the exhibit.

$ sudo journalctl -u myapp.service --since "1 hour ago"
-- Logs begin at Mon 2025-03-10 08:30:15 UTC, end at Mon 2025-03-10 12:45:22 UTC. --
Mar 10 11:30:17 server1 myapp[1234]: Starting application...
Mar 10 11:30:18 server1 myapp[1234]: [ERROR] Failed to bind to port 8080: Address already in use
Mar 10 11:30:18 server1 myapp[1234]: [INFO] Retrying in 5 seconds...
Mar 10 11:30:23 server1 myapp[1234]: [ERROR] Failed to bind to port 8080: Address already in use
Mar 10 11:30:23 server1 myapp[1234]: [INFO] Retrying in 10 seconds...
Mar 10 11:30:33 server1 myapp[1234]: [ERROR] Failed to bind to port 8080: Address already in use
Mar 10 11:30:33 server1 myapp[1234]: [FATAL] Exiting after repeated failures
Mar 10 11:30:33 server1 systemd[1]: myapp.service: main process exited, code=exited, status=1/FAILURE
Mar 10 11:30:33 server1 systemd[1]: myapp.service: Unit entered failed state.
Question 19hardmultiple choice
Full question →

An e-commerce company runs a critical application on a Linux server that occasionally becomes unresponsive. The server has 64GB RAM and runs a Java application. The operations team notices that during peak hours, the system becomes very slow and eventually the application crashes with 'OutOfMemoryError'. After restart, it works fine for a while. They suspect a memory leak but also want to ensure the system does not go down during peak hours. The system uses systemd to manage the Java service. The administrator needs to implement a solution that: (1) automatically restarts the service if it becomes unresponsive, (2) limits the memory usage of the service to prevent OOM kills on the system, and (3) provides early warning of high memory usage. Which of the following approaches best meets these requirements?

Question 20hardmultiple choice
Full question →

An administrator is troubleshooting a server that runs a critical application. The server has 16 GB of RAM and 8 CPU cores. The administrator notices that the server becomes very slow during peak hours. Analysis of 'iostat -x 1' shows that the average wait time (await) for the main disk (sda) is consistently above 1000 ms, while the average service time (svctm) is around 5 ms. What is the most likely cause?

These LFCS practice questions are part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style LFCS questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.