LPI · Free Practice Questions · Last reviewed May 2026
30real exam-style questions organised by domain, each with the correct answer highlighted and a plain-English explanation of why it's right — and why the others are wrong.
You want to find all occurrences of the string 'ERROR' within the 'syslog' file. Which command is most appropriate?
cat 'ERROR' syslog
find 'ERROR' syslog
grep 'ERROR' syslog
grep searches for the specified pattern in the file.
sed 'ERROR' syslog
Which command is used to display the current working directory in the terminal?
pwd
pwd outputs the absolute path of your current location.
dir
cd
ls
You need to display the contents of a file named 'config.txt' directly to your terminal screen. Which command should you use?
head config.txt
cat config.txt
cat displays the full content of a file.
echo config.txt
grep config.txt
You wish to send the output of the 'ls -l' command directly into a file named 'dirlist.txt', overwriting any existing content. Which operator should you use?
ls -l > dirlist.txt
'>' performs output redirection and overwrites.
ls -l | dirlist.txt
ls -l >> dirlist.txt
ls -l < dirlist.txt
You want to replace every occurrence of 'old' with 'new' in the file 'data.txt' and view the result in the terminal. Which command achieves this?
sed 's/old/new/g' data.txt
The 's' command performs substitution with global flag 'g'.
sed 's/old/new/' data.txt
grep 's/old/new/g' data.txt
sed 'r/old/new/g' data.txt
You need to set an environment variable named 'MYVAR' to 'hello' so that it is available to child processes. Which command is correct?
set MYVAR=hello
MYVAR=hello
env MYVAR=hello
export MYVAR=hello
export exports the variable to the environment.
Want more The Power OF The Command Line practice?
Practice this domainYou are managing a directory shared by a project team. You want all files created in this directory to automatically belong to the 'developers' group, regardless of the user's primary group. Which command achieves this?
usermod -aG developers
chgrp developers /data
chmod g+s /data
The setgid bit on a directory forces group inheritance.
chmod 1777 /data
You want to change the primary group of an existing user named 'bob' to 'staff'. Which command should you use?
groupmod -n staff bob
chgrp staff bob
usermod -g staff bob
This changes the primary group.
usermod -G staff bob
A system administrator needs to identify the numerical ID (UID) of the user 'jdoe'. Which file should be checked?
/etc/shadow
/etc/profile
/etc/passwd
This file stores user account metadata.
/etc/group
A user's account has been compromised. Which command is the most effective way to lock the user account immediately while preserving their files?
usermod -L jdoe
Locks the password without removing user data.
userdel jdoe
killall -u jdoe
chsh -s /bin/false jdoe
Which permission bit must be set on a directory to allow a user to enter the directory and access files within it?
Write (w)
Execute (x)
Execute grants directory traversal access.
Sticky bit
Read (r)
A user reports they cannot execute a script named 'deploy.sh' even though the file permissions are set to 644. What must you change to enable execution for the owner?
chmod 655 deploy.sh
chmod 744 deploy.sh
744 provides rwx for the user and r-- for group/others.
chown u+x deploy.sh
chmod +w deploy.sh
Want more Security And File Permissions practice?
Practice this domainWhich of the following describes the core philosophy of 'Open Source' as defined by the Open Source Initiative?
The source code must be available for modification and redistribution.
This is the primary requirement for a license to be considered open source.
The software must be provided for free without any charge.
The code must be written in C or C++.
The software must only be used for non-profit purposes.
A Linux administrator needs to determine if their distribution is based on Debian or RHEL. Which command or path is most indicative of this family?
Checking for the presence of the 'systemd' binary.
Checking for the existence of /etc/debian_version.
This file is present on all Debian and Debian-derived (Ubuntu, Mint) systems.
Running the 'uname -a' command.
Checking for the existence of /etc/sysconfig.
An open source developer wants to choose a license that allows their code to be included in proprietary software without requiring the proprietary software to open its source. Which license should they choose?
AGPL
GPLv3
MIT
The MIT license is highly permissive and allows inclusion in proprietary products.
Creative Commons Attribution-ShareAlike
When considering a career in Linux system administration, which certification path demonstrates proficiency in managing system-level services and security across diverse distributions?
LPIC-1: Linux Administrator
LPIC-1 focuses on fundamental Linux skills applicable to any distribution.
AWS Certified SysOps Administrator
Red Hat Certified System Administrator (RHCSA)
Cisco Certified Network Associate (CCNA)
Your company is considering moving from proprietary software to open source solutions. Which aspect of the GPL license is most restrictive regarding the distribution of modified code?
You must contribute all modifications back to the original project maintainer.
You must release the source code of any derivative works if you distribute the binaries.
The GPL requires that if you distribute a derivative work, the source must be made available under the same license.
You are not allowed to modify the source code for internal business use.
You are forbidden from selling any software that uses GPL code.
An administrator is comparing package management systems. Which tool is primarily used on RHEL-based distributions for resolving dependencies and downloading packages?
DNF
DNF is the default package manager for RHEL and Fedora.
Pacman
Portage
APT
Want more The Linux Community And A Career IN Open Source practice?
Practice this domainAn administrator wants to view the current system load and active processes. Which utility is the most appropriate for a real-time monitor?
df -T
ps aux
cat /proc/cpuinfo
top
top shows a live view of CPU, memory, and tasks.
You are configuring a Linux server and need to determine which hard drive partition is currently mounted as the root filesystem. Which file should you inspect?
/var/log/dmesg
/etc/passwd
/proc/partitions
/etc/fstab
This file defines how filesystems are mounted at boot.
A user reports that they cannot save files to their home directory. You find that the disk is not full. What is the most likely cause related to hardware-based limitations?
The partition has run out of inodes.
An inode exhaustion prevents new file creation even if disk space remains.
The RAM is corrupted.
The CPU temperature is too high.
The BIOS settings are incorrect.
You are managing a Linux server and need to confirm the IP address assigned to the eth0 interface. Which command is most appropriate on modern distributions?
ifconfig
ip addr
ip addr is the recommended command for showing IP configurations.
route -n
netstat -rn
You are troubleshooting a network issue where a Linux server cannot reach an external website. The ping command to the gateway succeeds, but pinging the website IP fails. Which configuration file should you check to ensure the server can resolve domain names?
/etc/network/interfaces
/etc/sysconfig/network
/etc/hosts
/etc/resolv.conf
This file defines the DNS resolvers used by the system.
A technician needs to identify the amount of RAM installed in a server without opening the chassis. Which command provides this information from the command line?
uptime
lsblk
free -m
free -m displays memory usage in megabytes.
df -h
Want more The Linux Operating System practice?
Practice this domainYou want to delete a directory named 'temp_backup' that contains several files. Which command will successfully remove it and its contents?
rm -r temp_backup
-r allows for recursive deletion of directory trees.
rm temp_backup
rmdir temp_backup
rm -f temp_backup
To navigate from your current directory to your home directory regardless of your current location, which command is most efficient?
cd ..
cd ~
The tilde represents the home directory path.
cd /
cd /home
Which of the following commands is used to create an empty file or update the timestamp of an existing file?
cp
touch
touch creates files or updates timestamps.
mkdir
mv
You are copying a directory named 'source' to 'destination' and want to ensure all subdirectories and file attributes are preserved. Which flag is essential?
cp -a
-a (archive) preserves everything and is recursive.
cp -p
cp -v
cp -r
You are using the 'less' command to view a large log file. Which key do you press to search forward for a specific string?
?
/
The forward slash prompts for a regex to search forward.
q
n
You need to search for a specific command description within the manual pages using a keyword. Which command should you use?
man -s
man -f
man -k
-k searches through the short descriptions of man pages.
help
Want more Finding Your Way ON A Linux System practice?
Practice this domainThe 010-160 exam has 200 questions and must be completed in 120 minutes. The passing score is 700/1000.
Scenario-based questions covering exam objectives with detailed answer explanations.
The exam covers 5 domains: The Power OF The Command Line, Security And File Permissions, The Linux Community And A Career IN Open Source, The Linux Operating System, Finding Your Way ON A Linux System. Questions are weighted by domain — higher-weight domains appear more on your actual exam.
No. These are original exam-style practice questions written against the official LPI 010-160 exam objectives. They are not copied from the real exam. Courseiva focuses on genuine understanding, not memorisation of braindumps.
Courseiva tracks your accuracy per domain and routes you toward weak areas automatically. Free, no account required.