Exam Information
Free practice questions with explanations
LPI 010-160 Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 17
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Finding Your Way on a Linux System
A junior administrator on a shared Ubuntu server has installed a custom tool in /opt/reporting/bin. Running the tool by name from any directory returns "command not found", but running it with its full path works. The administrator must make the tool available to all users without editing system-wide configuration files under /etc and without changing the tool's location. Which action meets these requirements?
A. Add /opt/reporting/bin to the PATH variable in each user's ~/.bashrc file
B. Create a symbolic link to the tool inside /usr/bin
C. Run export PATH=/opt/reporting/bin in the current shell session only
D. Set the tool's execute permission for the world using chmod o+xCorrect Answer: BExplanationCreating a symbolic link in /usr/bin places the tool on a directory that is already part of the default PATH for every user, and it leaves the original file where it is. Editing each user's ~/.bashrc requires per-user changes that will be missed for new accounts. Exporting PATH in one session affects only that shell and disappears when it closes. Changing the execute permission does not affect command lookup, because the shell searches PATH directories; the tool already has execute rights, so the failure is a PATH issue, not a permission issue.
-
2 Question 2 Single choice Finding Your Way on a Linux System
A developer wants a script to print the message "Build 42 finished at /srv/ci" where the value of a variable named BUILD holds the build number and DIR holds the directory. The script currently uses echo "Build $BUILD finished at $DIR" but a colleague notes the text should also show a literal dollar amount: "Cost: $5" must appear unchanged in a second line. Which quoting approach produces the required output for the second line without expanding the dollar sign?
A. echo "Cost: $5"
B. echo 'Cost: $5'
C. echo Cost: \$5 with the backslash removed by the shell only inside double quotes
D. echo "Cost: \\$5"Correct Answer: BExplanationSingle quotes suppress all expansion in Bash, so the dollar sign and the 5 that follows it are passed to echo literally. Double quotes still allow parameter expansion, so $5 refers to positional parameter 5, which is empty in most scripts, and the amount disappears. Choice C describes a backslash-removal rule that does not match how the shell works for an unquoted sequence. Choice D uses two backslashes inside double quotes, which yields one literal backslash followed by the expanded $5, so the dollar amount is still lost.
-
3 Question 3 Single choice Using the Command Line to Get Help
A system administrator on a Debian server needs to find the configuration file for the rsyslog service without knowing its exact name. She also wants to confirm which version of the package is installed and read the installation notes the package maintainer shipped. The server has no internet access. Which combination of commands is the most efficient way to achieve this?
A. Run apropos rsyslog to find matching man pages, then run dpkg -s rsyslog and read the files under /usr/share/doc/rsyslog
B. Run info rsyslog and then search the web for the package version number
C. Run locate rsyslog.conf and then run man rsyslog.conf after updating the locate database over the internet
D. Run help rsyslog and then open /etc/rsyslog.conf in a text editor to read the notesCorrect Answer: AExplanationapropos searches the short descriptions of man pages and finds relevant documentation without needing the exact name, and dpkg -s reports the installed version offline. Maintainer notes are stored under /usr/share/doc/ for each package. Choice B requires internet access, which the server lacks. Choice C depends on updating the locate database over the internet, which is not available here. Choice D uses help, which is a shell builtin for shell commands rather than a documentation lookup for an installed service, and opening the configuration file does not provide installation notes.
-
4 Question 4 Single choice Using Directories and Listing Files
A backup script on a CentOS host runs from /home/backup and must copy the configuration directory located at /home/backup/../etc-snapshots/ and also process a hidden directory named .cache inside the user's home. The script changes directory with cd ../ and then tries to access the hidden directory using a relative path. The administrator needs a method that works regardless of the directory the script is launched from and that also lists hidden files in the target directory. Which approach best satisfies these requirements?
A. Use absolute paths such as /home/backup/.cache and run ls -a against the target directory
B. Use ls -l with a relative path, because -l also displays hidden entries
C. Use cd ~ followed by ls without options, which lists hidden entries automatically
D. Use ls -R, because recursive listing always includes dot-prefixed directories in the top levelCorrect Answer: AExplanationAbsolute paths remove dependence on the current working directory, which is the root cause of the failing relative paths in the script. ls -a is the option that shows entries whose names begin with a dot. ls -l shows details but still hides dot files unless -a or -A is given. Plain ls with no options never displays hidden entries, which rules out the cd ~ approach. ls -R recurses into subdirectories but does not reveal hidden entries by itself.
-
5 Question 5 Single choice Basic Security and Identifying User Types
An auditor reviewing a company Ubuntu server finds that a service account named svc_reports has a valid login shell and a password hash in /etc/shadow. The service runs a cron job only and must never be used for interactive login. The company policy also requires that administrators continue to use sudo rather than logging in directly as root. Which change best satisfies the policy with the least disruption?
A. Set the account's shell to /usr/sbin/nologin using usermod -s and lock the password with passwd -l
B. Delete the svc_reports account and move the cron job to root's crontab
C. Add svc_reports to the sudo group so its actions are logged through sudo
D. Change the UID of svc_reports to 0 so the account is treated as a privileged system userCorrect Answer: AExplanationA system or service account needs no interactive shell, so pointing its login shell to nologin blocks interactive logins while cron can still run its jobs, and locking the password removes password-based access. Deleting the account and moving the job to root's crontab gives the service root privileges, which violates least privilege. Adding it to the sudo group grants elevated rights that the service does not need. Setting UID 0 makes the account equivalent to root, which is clearly unacceptable.
-
6 Question 6 Single choice Creating Users and Groups
A company is onboarding a contractor who needs a standard user account on an Ubuntu file server. The contractor must belong to the existing group projectteam, must have a home directory populated with the company's standard shell configuration, and must have a UID of 1500 to match an ACL on a legacy share. Which command meets all three requirements?
A. useradd -m -u 1500 -g projectteam -k /etc/skel contractor
B. useradd -u 1500 -G projectteam -m contractor
C. useradd -m -u 1500 -G projectteam contractor
D. useradd -u 1500 -g projectteam -d /home/contractor contractorCorrect Answer: AExplanationThe -g option sets the primary group, which is the requirement stated as belonging to projectteam in the sense of the file group that new files will carry, while -G would add supplementary memberships. The -m option creates the home directory and -k /etc/skel points to the skeleton directory from which the shell configuration files are copied. The -u option sets the UID. The -G variants in choices B and C add projectteam only as a supplementary group, and the primary group then becomes an auto-created group. Choice D omits -m, so no home directory is created and no skeleton files are copied.
-
7 Question 7 Single choice Creating Users and Groups
An administrator on a Debian server must create a group named auditors and then give an existing user, maria, membership in that group without removing maria from her current supplementary groups. Maria's account must remain in her current primary group. Which pair of commands accomplishes this correctly?
A. groupadd auditors followed by usermod -aG auditors maria
B. groupadd auditors followed by usermod -G auditors maria
C. groupadd -g auditors followed by usermod -g auditors maria
D. useradd -G auditors maria followed by groupadd auditorsCorrect Answer: AExplanationgroupadd creates the group, and usermod -aG appends the supplementary group without removing existing memberships. Without the -a flag, usermod -G replaces the full supplementary list, which would strip maria from her current groups. Choice C misuses -g, which sets the primary group and also takes a numeric GID rather than a name in that position. Choice D attempts to add maria to a group before it exists, and useradd would fail because the user already exists.
-
8 Question 8 Single choice Managing File Permissions and Ownership
A shared directory /srv/finance on a Linux file server contains spreadsheets owned by the group finance. The group needs read and write access to all files, but a user named temp_intern, who is a member of finance, must only be able to read the files and must not modify or delete them. The administrator wants to avoid creating new groups or ACLs. Which setting best meets these requirements in the simplest way?
A. Set the directory mode to 2770 and remove temp_intern from the finance group
B. Set the directory mode to 2775 and give temp_intern a separate primary group with read-only access
C. Set the directory mode to 2770 and set the file mode to 660 for every file, so temp_intern is blocked completely
D. Keep the directory at 775 and change ownership of each file to temp_intern for read accessCorrect Answer: AExplanationThe constraints rule out per-user workarounds. Removing temp_intern from the finance group prevents the account from being a member of the group that holds write permission, and the setgid bit on the directory keeps new files owned by finance. With the group now lacking membership for temp_intern, the others permission of zero blocks access, which conflicts with the stated read-only requirement. Choice A therefore fails the read requirement, so the correct answer is actually the one that keeps the user in the group and uses read-only group permission: directory mode 2750 with files at 640 would give read to group members, but the stem forbids new groups or ACLs and requires read-only for one member of finance, which only a file-level mode cannot offer separately, so the accurate key is B.
-
9 Question 9 Single choice The Linux Community and a Career in Open Source
A company is choosing a Linux distribution for a fleet of embedded kiosks built on Raspberry Pi hardware. The kiosks run a fixed application, have limited storage, and receive security updates only through the vendor's ARM image repository. The operations team wants a distribution officially maintained for this hardware family so that boot firmware and kernel patches are supplied together. Which distribution is the most appropriate choice?
A. Raspbian
B. Ubuntu Server for amd64
C. CentOS Stream for x86_64
D. Scientific Linux for enterprise desktopsCorrect Answer: AExplanationRaspbian is the Debian-based distribution maintained specifically for the Raspberry Pi family, so kernel, firmware, and hardware support are packaged together. Ubuntu Server amd64 and CentOS Stream x86_64 target standard PC architectures and will not boot on ARM Raspberry Pi hardware. Scientific Linux is a desktop-oriented rebuild of the Red Hat line for x86 systems and carries no Raspberry Pi support, so it fails the hardware constraint.
-
10 Question 10 Single choice Major Open Source Applications
A small company wants to host its own file sharing and calendar service on a single Ubuntu server, with user data kept on-premises for compliance. The administrators need a web-based application that provides file synchronisation and calendar features, can use an existing MariaDB database, and is available under an open source license. The team does not want to pay for a proprietary product. Which package is the best fit?
A. Nextcloud
B. Samba
C. NFS
D. ThunderbirdCorrect Answer: AExplanationNextcloud is an open source, self-hosted platform offering file synchronisation, sharing, and calendar features through a web interface, and it can be backed by MariaDB. Samba provides Windows file sharing protocols but has no calendar or web interface. NFS is a network filesystem protocol for Unix-like systems and offers neither sync nor calendar functionality. Thunderbird is a desktop mail and calendar client that runs on the user's machine and cannot serve as a shared server-side application.
-
11 Question 11 Single choice Choosing an Operating System
A regional clinic runs a line-of-business server on Ubuntu 20.04 LTS. The vendor requires that all production servers remain on a supported release that receives security updates for at least the next three years, and the clinic's compliance officer requires that the release used never be a pre-release build. A junior engineer proposes upgrading the server to the latest interim Ubuntu release because it offers newer kernel features. Which response is correct?
A. Reject the upgrade, because interim releases have a shorter maintenance cycle and may be pre-release builds, while LTS releases receive extended support
B. Approve the upgrade, because newer interim releases always receive longer support than LTS releases
C. Approve the upgrade only after changing the repository channel from stable to beta
D. Approve the upgrade, because interim releases and LTS releases follow identical maintenance cyclesCorrect Answer: AExplanationLTS releases carry a multi-year maintenance window that matches the vendor requirement, whereas interim releases receive support for a much shorter period. Using a beta channel violates the compliance rule against pre-release builds. The claim that interim releases get longer support is the reverse of how the maintenance cycles work. Treating the two release types as identical ignores the LTS designation that drives the support commitment.
-
12 Question 12 Single choice Understanding Computer Hardware
A technician is planning a storage upgrade for a Linux database server. The current system has a single SATA drive at /dev/sda and the team wants to add a second NVMe solid state disk to hold the database files. After installation the administrator runs lsblk and sees the new device listed but unpartitioned. The team wants the database to use the whole disk as one filesystem and to prevent the disk name from changing on reboot. Which action is required first?
A. Create a GPT partition table and one partition on the new device, then reference it by UUID in /etc/fstab
B. Install the vendor-specific driver package for the NVMe controller from the manufacturer website before any other step
C. Format the device directly with mkfs.ext4 and mount it using the name /dev/sda2
D. Edit /etc/udev/rules.d to rename the device to a fixed name before creating any partitionCorrect Answer: AExplanationThe device is already recognised by the kernel, as lsblk shows it, so no driver installation is needed. The unpartitioned disk must first receive a partition table and a partition, and then its filesystem can be created. Referencing the filesystem by UUID in /etc/fstab keeps the mount stable regardless of how the kernel names the device at boot. Formatting the raw disk and mounting it as /dev/sda2 mixes up the SATA and NVMe devices and does not create a partition. Renaming through udev is unnecessary when UUIDs solve the stability requirement.
-
13 Question 13 Single choice Archiving Files on the Command Line
A system administrator must archive the directory /home/alex/projects into a compressed file named projects.tar.gz, then verify the archive contents without extracting anything. The administrator has a shell history showing the commands tar -cvf projects.tar /home/alex/projects and gzip projects.tar. Which sequence produces the required gzip-compressed archive and then lists its contents?
A. tar -czf projects.tar.gz /home/alex/projects followed by tar -tzf projects.tar.gz
B. tar -xzf projects.tar.gz /home/alex/projects followed by tar -tf projects.tar.gz
C. tar -cjf projects.tar.gz /home/alex/projects followed by tar -tzf projects.tar.gz
D. tar -czf projects.tar.gz /home/alex/projects followed by tar -xf projects.tar.gzCorrect Answer: AExplanationThe -c option creates an archive, -z applies gzip compression, and -f names the output file, so tar -czf creates the gzip-compressed archive directly. Listing its contents without extracting requires -t together with -z so tar decompresses the stream for reading. Choice B extracts with -x, which violates the instruction not to extract. Choice C uses -j, which selects bzip2 rather than gzip, so the file would not match the requested format. Choice D extracts the archive, which the administrator explicitly wants to avoid.
-
14 Question 14 Single choice Turning Commands into a Script
An operator wants a script that takes a log file name as its first argument, counts how many lines contain the word ERROR, and prints the count. The script must exit with status 1 and print a usage message if no argument is supplied. A colleague's draft uses if [ $1 = "" ] to check for the missing argument, but the script crashes with an error about unary operators whenever it is run without arguments. Which corrected test is the most appropriate?
A. if [ -z "$1" ]; then ... fi
B. if [ $# -eq 0 ] && [ $1 = "" ]; then ... fi
C. if [ "$1" == "" ] then ... fi with a semicolon after the closing bracket
D. if [ -n $1 ]; then ... fiCorrect Answer: AExplanationWhen the first argument is absent, $1 expands to nothing and the unquoted test becomes malformed, which causes the unary operator error. Quoting the variable as "$1" and using -z, which tests for an empty string, handles the missing argument cleanly. Choice B still evaluates $1 unquoted in the second test when the first condition is true, so the error can recur. Choice C uses == which is a Bash extension and is also missing the required semicolon before then. Choice D uses -n unquoted, which reproduces the same empty-argument failure and tests the opposite condition.
-
15 Question 15 Order list Searching and Extracting Data from Files
A support engineer needs a one-line report listing the ten most frequent client IP addresses that appear in the first field of /var/log/app/access.log, sorted by count in descending order. The steps below are shuffled. Put them in the order that produces the correct output. Drag the steps into the correct order.
Drag the steps into the correct order, or use the arrows.
- Use sort | uniq -c to count each distinct address
- Use sort -rn to order the counts from highest to lowest
- Use less to page through the final result
- Use cut -d ' ' -f1 to extract the first space-delimited field
- Read the file with cat access.log
- Use head -n 10 to keep only the ten highest-count lines
Correct Answer:- Read the file with cat access.log
- Use cut -d ' ' -f1 to extract the first space-delimited field
- Use sort | uniq -c to count each distinct address
- Use sort -rn to order the counts from highest to lowest
- Use head -n 10 to keep only the ten highest-count lines
- Use less to page through the final result
ExplanationThe data flows from reading the file, to extracting the IP field, to counting identical lines after sorting them, to ordering by count, and finally to trimming to the top ten. uniq -c only counts adjacent duplicates, so sort must come before it, which is why step 3 follows the cut step. Choice B places the count before field extraction, which would count whole log lines rather than addresses. Choice C orders the counts before they exist. Choice D tries to cut before reading the file, which is impossible.
-
16 Question 16 Single choice Basic Security and Identifying User Types
An administrator is reviewing account records on a Linux server and must match each item to the file or command that stores or reports it:
1. Hashed user passwords and password aging data
2. Group names and their member lists
3. Real-time information about who is currently logged in and what they are doing
Target options:
A. /etc/shadow, /etc/group, w
B. /etc/passwd, /etc/shadow, last
C. /etc/group, /etc/shadow, who
D. /etc/shadow, /etc/group, id
Which mapping is correct?Correct Answer: AExplanationPassword hashes and aging fields live in /etc/shadow, which is readable only by root, and group names with their member lists are stored in /etc/group. The w command reports currently logged-in users together with what each is running, which matches the third item. Choice B assigns hashes to /etc/passwd, which holds account information but not hashes on modern systems. Choice C places group data in /etc/shadow and suggests who, which shows logins but not current activity. Choice D maps id to live login activity, but id reports the identity and groups of a user, not who is logged in.
-
17 Question 17 Dropdown Creating Users and Groups
Choose the correct value for each blank.
Choose the correct value for each blank.
A new employee account was created on a Debian server so that the user's home directory receives the company's default bash profile. The administrator runs the command useradd -m -k employee2 and then verifies the account by inspecting the line for it in . Which pair of values completes the statements correctly?
A. /etc/skel; /etc/passwd
B. /etc/shadow; /etc/group
C. /etc/skel; /etc/shadow
D. /etc/passwd; /etc/passwdCorrect Answer:A new employee account was created on a Debian server so that the user's home directory receives the company's default bash profile. The administrator runs the command useradd -m -k /etc/skel employee2 and then verifies the account by inspecting the line for it in /etc/passwd. Which pair of values completes the statements correctly?
A. /etc/skel /etc/skel; /etc/passwd /etc/passwd
B. /etc/skel /etc/shadow; /etc/passwd /etc/group
C. /etc/skel /etc/skel; /etc/passwd /etc/shadow
D. /etc/skel /etc/passwd; /etc/passwd /etc/passwdExplanationThe -k option takes a skeleton directory, and /etc/skel is the standard source of the default files copied into new home directories. The account entry itself, including its UID, GID, home directory, and login shell, is recorded in /etc/passwd, which is world-readable. The password hash is in /etc/shadow, so checking it would not show the account's configuration fields. /etc/shadow and /etc/group are not used as skeleton sources, which rules out choice B and most of C and D.
These are 17 of the 81 questions in the full 010-160 pack.
Get All 81 QuestionsGet all 81 questions & answers
Full access options for LPI 010-160
Self-study
PDF Version
- 81 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 81 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 81 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the 010-160 Exam (Linux Essentials - Exam 010, (version 1.6)) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.