LPI Linux Essentials 010-160 Practice Exam Questions and Answers – Part 5/6

Practice for the LPI Linux Essentials exam with 13 exam-style practice questions, instant answer reveals, and concise explanations of every correct answer. Topics include: Which of the following commands can search for executable programs or scripts located in the PATH variable?. 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 commands can search for executable programs or scripts located in the PATH variable?
  • Which keyboard shortcut allows copying highlighted text while working in the command line terminal?
  • Which command can be used to search help files that mention the word "copy"?
  • Your current present working directory is /home/jason/documents/. You just entered cd . into the command line…
  • Which option can be used with tail to print the last X bytes of a file to the screen?
  • Which of the following is the file descriptor number used to represent Standard In (STDIN)?

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 commands can search for executable programs or scripts located in the PATH variable?

Answer: C. which

The which command searches the directories listed in your PATH variable to locate executable programs. If the program exists in your path, this command displays its exact location.

Q2. Which keyboard shortcut allows copying highlighted text while working in the command line terminal?

Answer: B. CTRL + SHIFT + C

Pressing Control, Shift, and C copies highlighted text within a Linux terminal. Standard Control plus C will not copy text, because that combination is reserved for sending an interrupt signal to stop a running process.

Q3. Which command can be used to search help files that mention the word "copy"?

Answer: B. man –k copy

The man command with the dash k option searches the manual page names and short descriptions for a given keyword. Be careful, because the regular man command only opens a specific manual page if you already know its exact name.

Q4. Your current present working directory is /home/jason/documents/. You just entered cd . into the command line and then enter pwd. What output do you receive?

Answer: A. /home/jason/documents/

The single dot represents the current working directory, so changing to it leaves you exactly where you started. The pwd command simply prints that original path, meaning you never actually move up or down the tree.

Q5. Which option can be used with tail to print the last X bytes of a file to the screen?

Answer: C. -c

The dash c option tells the tail command to output a specific number of bytes from the end of a file. The dash n option is used when you want to print a specific number of lines instead.

Q6. Which of the following is the file descriptor number used to represent Standard In (STDIN)?

Answer: A. 0

Standard input is always assigned file descriptor zero by the Linux kernel. For quick recall, just remember the numerical order starting with zero.

Q7. Which of the following is the file descriptor number used to represent Standard Out (STDOUT)?

Answer: B. 1

Standard output is always assigned file descriptor one by the system. Standard input is zero, standard output is one, and standard error is two.

Q8. Which command is used to print the full contents of a file to the screen at once?

Answer: A. cat

The cat command reads files sequentially and writes them to standard output. While less also displays file contents, cat dumps the entire file at once instead of opening an interactive pager.

Q9. Which redirection operator accepts text on the following lines as standard input?

Answer: C. <<

The double less than operator is a here document that passes subsequent lines as standard input. This differs from the single less than operator, which redirects input from an existing file.

Q10. Which of the following is used as a virtual or pseudo filesystem used to interface with the kernel and processes?

Answer: B. /proc

The proc virtual filesystem provides an interface to kernel data structures and running processes. The sys filesystem also handles kernel data, but proc specifically maps process directories by their P I D.

Q11. You have just created a text file called password.txt containing a secret password. You want to ensure that the file is not seen when the ls command is run within the current directory. What command should you use to hide the text file?

Answer: C. mv password.txt .password.txt

The move command is used to rename files, and adding a leading dot to the new name makes it hidden in Linux. Using the hidden extension does nothing, because Linux only cares about that leading dot.

Q12. Which of the following commands will create a single directory named dir1 dir2?

Answer: B. mkdir "dir1 dir2"

Putting quotes around the name forces the system to treat the space as part of a single string. Without quotes, the command would fail or try to create two separate directories.

Q13. Which of the following would properly identify the device associated with the second partition on the first hard disk on the first IDE controller of a system?

Answer: A. /dev/hda2

Legacy IDE drives use the naming convention where the first drive is hda and its second partition is hda2. Modern SATA drives use sda, but knowing legacy naming remains highly relevant for foundation exams.

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

Scroll to Top