Skip to content

LPI

LPI Linux Essentials

Exam 6 · 36 questions · Choose another exam

  1. Question 190 of 225Which of the following is NOT an example of a Linux software package manager?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  2. Question 191 of 225How can the normal output from a command be written to a file while discarding the error output?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  3. Question 192 of 225Which 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?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  4. Question 193 of 225Which symbol is used to prefix a variable?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  5. Question 194 of 225Which option of the command history can be used to clear the user's history?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  6. Question 195 of 225Which command lists all files in the current directory that start with a capital letter?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  7. Question 196 of 225Which command shows if /usr/bin is in the current shell search path?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  8. Question 197 of 225Which of the following commands can be used to determine the time of the last login of a given user?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  9. Question 198 of 225Which of the following outputs might be displayed when executing the command last?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  10. Question 199 of 225Which command adds the new user tux and creates the user's home directory with default configuration files?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

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

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  12. Question 201 of 225What 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?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  13. Question 202 of 225Which network device serves as the gateway between your internal network and external network?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  14. Question 203 of 225What is the command that will show system boot time messages?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  15. Question 204 of 225Which type of files is an important part of diagnosing problems with daemons?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  16. Question 205 of 225Your 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?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  17. Question 206 of 225Where is the BIOS located?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  18. Question 207 of 225What does the grep command allow a user to do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  19. Question 208 of 225Which option can be used to redirect the errors of a command to a specified file?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  20. Question 209 of 225To determine if the last command run on a system was successful, which command should be executed?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  21. Question 210 of 225How would you represent r-xrw-r-- in octal notation?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  22. Question 211 of 225Which of the following is an example of globbing?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  23. Question 212 of 225Which of the following is the core computer program with complete control over everything in the system?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  24. Question 213 of 225Which command launches the web browser Firefox from the command line?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

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

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  26. Question 215 of 225How can the current directory and its subdirectories be searched for the file named MyFile.xml?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  27. Question 216 of 225Which of the following is not a standard man page section heading?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  28. Question 217 of 225Which file contains a list of the user's secondary groups?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  29. Question 218 of 225Which of the following statements is FALSE?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  30. Question 219 of 225Which of the following are two types of output messages?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  31. Question 220 of 225What does the redirection operator <> do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  32. Question 221 of 225Which command to use to show which shell is being used?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  33. Question 222 of 225Which of the following is NOT one of the core technologies of the World Wide Web?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  34. Question 223 of 225Which command can be used to display the command line history for a given user?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  35. Question 224 of 225What is the correct statement to be used for comparison in a Linux shell script?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

  36. Question 225 of 225The "cd" command is short for _____________.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct 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.

Study on mobile

Get CertPunch for iOS or Android.

Website sessions are saved in this browser tab. They do not transfer to the apps.

Scroll to Top