LPI Linux Essentials 010-160 Practice Exam Questions and Answers – Part 17/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 option can be used to redirect the errors of a command to a specified file?. 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 option can be used to redirect the errors of a command to a specified file?
  • To determine if the last command run on a system was successful, which command should be executed?
  • How would you represent r-xrw-r– in octal notation?
  • Which of the following is an example of globbing?
  • Which of the following is the core computer program with complete control over everything in the system?
  • Which command launches the web browser Firefox from the command line?

Answers and explanations

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

Q1. Which option can be used to redirect the errors of a command to a specified file?

Answer: B. 2>

File descriptor 2 represents standard error, so using 2 greater than sends those error messages into a specified file. File descriptor 1 handles standard output, making it the strongest distractor if you mix the streams.

Q2. To determine if the last command run on a system was successful, which command should be executed?

Answer: A. echo $?

The dollar sign followed by a question mark expands to the exit status of the most recently executed foreground pipeline. Remember that an exit status of zero indicates success, while any non-zero value indicates an error.

Q3. How would you represent r-xrw-r– in octal notation?

Answer: C. 564

Read equals four, write equals two, and execute equals one. Adding these values gives five for the first set, six for the second, and four for the third, resulting in an octal mode of five six four.

Q4. Which of the following is an example of globbing?

Answer: D. ls /etc/*.txt

Globbing uses wildcard characters like the asterisk to match multiple filenames. The other options demonstrate output redirection and piping, which manage data streams rather than expand file patterns.

Q5. Which of the following is the core computer program with complete control over everything in the system?

Answer: B. Kernel

The kernel is the core component of the operating system that directly manages hardware resources. It acts as a bridge between applications and the physical data processing hardware.

Q6. Which command launches the web browser Firefox from the command line?

Answer: A. firefox

Typing the application name at the prompt launches the graphical program if it resides in your path. The alternative choices are not valid Linux commands for starting graphical software.

Q7. Which of the following is a suite of client-server software for creating and using file hosting services?

Answer: D. ownCloud

ownCloud provides the functionality to create a self-hosted file synchronization and sharing server. The other options are simply made-up distractor names designed to sound similar to popular cloud services. Recognizing common open source cloud software is key.

Q8. How can the current directory and its subdirectories be searched for the file named MyFile.xml?

Answer: A. find . -name MyFile.xml

The find command starting with a dot searches the current directory and all subdirectories for a specific file name. Grep is used for searching inside file contents, not for locating files by name across the directory tree.

Q9. Which of the following is not a standard man page section heading?

Answer: B. Mistakes

Standard manual pages use sections like Name, Configuration, and Return Value, but they do not use a section called Mistakes. Errors are typically documented under a dedicated Errors heading, making Mistakes the correct false option.

Q10. Which file contains a list of the user's secondary groups?

Answer: D. /etc/group

The slash etc slash group file contains a list of every user on the system and their secondary group memberships. Remember that primary groups are defined in slash etc slash passwd, while secondary groups are mapped here.

Q11. Which of the following statements is FALSE?

Answer: D. Hidden files start with a pound/hashtag.

Hidden files in Linux are denoted by a leading dot or period in their filename, not a pound sign. Remember that Linux file extensions are mostly arbitrary, whereas the leading dot actively hides the file from standard directory listings.

Q12. Which of the following are two types of output messages?

Answer: C. Standard Output and Standard Error messages

Standard output and standard error are the two default output streams generated by command line operations. Standard output captures successful results, while standard error isolates diagnostic messages and failures.

Q13. What does the redirection operator <> do?

Answer: B. Causes the specified file to be used for both standard input and standard output

The angle bracket syntax opens the specified file for both reading and writing simultaneously. This behavior differs from standard input redirection, which only reads content from the designated file.

Q14. Which command to use to show which shell is being used?

Answer: A. echo $SHELL

The shell environment stores the path to your default shell in the capital S variable. Using the echo command prints this value, while the other suggested commands do not exist.

Q15. Which of the following is NOT one of the core technologies of the World Wide Web?

Answer: A. Browser

Hyper Text Markup Language, Cascading Style Sheets, and JavaScript are the three foundational languages of the web. A browser is an application used to render these languages, not a core technology itself.

Q16. Which command can be used to display the command line history for a given user?

Answer: B. history

The history command is used to display the command line history for the current user. While the command alone does not clear the history, it is the correct tool for viewing past commands, unlike the clear command which simply wipes the screen.

Q17. What is the correct statement to be used for comparison in a Linux shell script?

Answer: A. if [ $x -gt $y ]

The test command evaluates conditional expressions, and the bracket syntax is a common shorthand for this. Without the brackets, the shell attempts to run the variable value as a command, which causes an error.

Q18. The "cd" command is short for _____________.

Answer: A. Change Directory

The cd command stands for change directory and is used to navigate the file system hierarchy. While there are other path commands, this is the standard utility for moving your current working location in Linux.

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

Scroll to Top