LPI Linux Essentials 010-160 Practice Exam Questions and Answers – Part 16/17

Practice for the LPI Linux Essentials exam with 18 exam-style practice questions, instant answer reveals, and concise explanations of every correct answer. Topics include: Which of the following is NOT an example of a Linux software package manager?. Follow @CertPunch and visit certpunch.com for more certification practice exams and study content.

Prefer hands-on? Take this round as an interactive practice test — answer every question, get instant feedback, and see your score: Start the LPI Linux Essentials practice test →

What you will practice

  • Which of the following is NOT an example of a Linux software package manager?
  • How can the normal output from a command be written to a file while discarding the error output?
  • Which of the following is a series of small single-board computers developed to promote the teaching of basic…
  • Which symbol is used to prefix a variable?
  • Which option of the command history can be used to clear the user's history?
  • Which command lists all files in the current directory that start with a capital letter?

Answers and explanations

Tap a question to expand the answer and the exam reasoning. Try to commit to your own pick first.

Q1. Which of the following is NOT an example of a Linux software package manager?

Answer: D. abc

The dpkg, yum, and rpm tools are all package managers used to install, update, and manage software on Linux distributions. Recognizing acronyms like yum and rpm is crucial, while abc is a fabricated distractor that stands out immediately.

Q2. How can the normal output from a command be written to a file while discarding the error output?

Answer: D. command >file 2>/dev/null

Using 2 greater than dev null redirects standard error to a black hole, effectively discarding it. Appending greater than file ensures that normal standard output is successfully captured and written to your target text file.

Q3. Which of the following is a series of small single-board computers developed to promote the teaching of basic computer science in schools and developing countries?

Answer: D. Raspberry Pi

Raspberry Pi is a widely recognized series of small single-board computers heavily used in education and do-it-yourself projects. The other three options are fictitious distractors playing on the recognizable fruit-based naming convention.

Q4. Which symbol is used to prefix a variable?

Answer: A. $

The dollar sign is used to reference and expand the value of a variable in the shell. The ampersand typically backgrounds processes, while percent and at symbols have different contextual uses but do not prefix standard shell variables.

Q5. Which option of the command history can be used to clear the user's history?

Answer: C. -c

The history command with the dash c flag clears the current user session command history from memory. The other listed flags and strings are either syntactically incorrect or simply made up for the Linux command line.

Q6. Which command lists all files in the current directory that start with a capital letter?

Answer: C. ls [A-Z]*

Using bracket notation with an asterisk correctly leverages shell globbing to match any file starting with an uppercase letter. Simply typing ls with a range and no brackets will cause the shell to look for literal characters instead of matching patterns.

Q7. Which command shows if /usr/bin is in the current shell search path?

Answer: B. echo $PATH

Echoing the PATH variable directly outputs the colon-separated directories the shell searches for executables. Reading the PATH variable with cat would attempt to open files named by those directories instead of displaying the variable itself.

Q8. Which of the following commands can be used to determine the time of the last login of a given user?

Answer: C. last

The last command reads from a log file and prints the entries of successful login attempts made by previous users. For the exam, remember that history only lists shell commands, while last actually details user login sessions.

Q9. Which of the following outputs might be displayed when executing the command last?

Answer: C. root tty2 Wed Sep 29 21:11 – 21:11 (00:00)

The last command reads from a log file and prints the entries of successful login attempts made by users in the past. The most recent logged in user entry appears on top, showing the terminal, timestamp, and duration.

Q10. Which command adds the new user tux and creates the user's home directory with default configuration files?

Answer: C. useradd -m tux

The useradd command paired with the m option creates the user home directory and copies default configuration files. Watch out for invalid commands like usercreate, which act as simple distractors on the exam.

Q11. Which command is used to provide information about a user's identity, including the names of the groups that the user belongs to?

Answer: B. id

Only the id command provides immediate information about user identity, including UID and all associated group names. While you could manually parse system files, the id command instantly displays the required combined information.

Q12. What is a special permission bit set on a file or a directory that lets only the owner of the file/directory or the root user delete or rename the file?

Answer: B. Sticky bit

A sticky bit is a special permission set on a directory that lets only the file owner or root user delete or rename files. This is commonly seen on shared directories like slash tmp to prevent users from deleting files.

Q13. Which network device serves as the gateway between your internal network and external network?

Answer: B. Router

A router is a device used to connect two networks, such as your internal network and an external network. Routers typically serve as your default gateway, whereas switches and hubs only connect devices locally.

Q14. What is the command that will show system boot time messages?

Answer: C. dmesg

The dmesg command prints the message buffer of the kernel. This output typically contains messages produced by device drivers that occur during system startup and boot, making it the standard tool for reviewing hardware events.

Q15. Which type of files is an important part of diagnosing problems with daemons?

Answer: A. Log files

Log files record system events and daemon activities, making them the primary resource for troubleshooting background service issues. Because daemons rarely display errors directly on your terminal, reviewing these logs is essential for finding root causes.

Q16. Your system is having an issue that you think is being caused by a faulty device driver. Which of the following commands should you use to print the message buffer of the kernel?

Answer: B. dmesg

The dmesg command reads and prints the kernel ring buffer, which contains hardware initialization and device driver messages. If you suspect a driver fault during boot, running dmesg is your immediate diagnostic step.

Q17. Where is the BIOS located?

Answer: B. Motherboard

The BIOS is firmware stored on a chip physically located on the computer motherboard. It initializes hardware during boot, serving as a bridge before the operating system loads from your storage drive.

Q18. What does the grep command allow a user to do?

Answer: B. Search for files that contain a specified string

The grep utility performs global searches using regular expressions across plain text data sets. It acts as a powerful filter, allowing you to quickly extract matching lines from command output or files.

More LPI Linux Essentials drills and other practice exams are on @CertPunch. New rounds drop every few days at certpunch.com.

Scroll to Top