Sample questions
Linux Foundation Certified System Administrator LFCS practice questions
After deleting user 'alice', the system administrator wants to also remove the home directory and mail spool. Which command should be used?
Which TWO commands can be used to resolve a hostname to an IP address?
A system administrator is managing a RHEL 8 server that requires a static IP address on interface ens192. The administrator modifies /etc/sysconfig/network-scripts/ifcfg-ens192 to…
Which TWO commands can be used to display listening TCP ports on a Linux system?
A system administrator needs to list all files in the current directory, including hidden files, in a long listing format sorted by modification time (oldest first). Which command…
An administrator wants to ensure that a service is listening on TCP port 8080 and accessible from remote hosts. Which command will confirm that the service is listening on the corr…
A user reports that a script fails with 'Permission denied' when executed. The script has permissions -rw-r--r-- and is owned by the user. Which command should the user run to make…
Which THREE of the following statements about the user private group (UPG) scheme are true?
Which TWO methods can be used to set a static IPv4 address on a CentOS 7 system? (Choose two.)
Which TWO of the following commands can be used to check and repair an ext4 filesystem?
A system administrator needs to mount an ext4 filesystem with the options 'noatime' and 'errors=remount-ro'. Which mount command is correct?
A system administrator needs to ensure that a Linux server can communicate with other hosts on the same subnet. Which command should be used to verify the IP address and netmask co…
A user reports that they cannot reach a remote server by hostname but can reach it by IP address. Which configuration file is most likely misconfigured?
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?
An administrator needs to compress a directory named 'project' into a tarball with maximum compression using gzip. Which command is appropriate?
An administrator is configuring a bridge using iproute2. Which command correctly attaches eth0 to bridge br0?
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, us…
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?
You administer a Linux server that acts as a network gateway. It has two network interfaces: eth0 (external, with IP 203.0.113.10/24, gateway 203.0.113.1) and eth1 (internal, with…
An administrator wants to ensure that a service starts automatically after a system crash. Which systemd command should be used?
A junior administrator needs to create a compressed archive of the /etc directory that preserves file ownership and permissions, and writes it to /backup/etc.tar.gz. Which single c…
A user needs to view the contents of a compressed log file /var/log/syslog.gz without first decompressing it. Which command should they use?
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 r…
Order the steps to set up a LVM logical volume from a new disk.