Skip to content

LPI

LPI Linux Essentials

Exam 4 · 38 questions · Choose another exam

  1. Question 115 of 225What is the ls command used for in Linux?

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

    Show answer & explanation

    Correct answer: A. Lists the files within a directory

    The ls command is used to list the files and directories within a specified path. It does not inherently display active network shares or track which local users are actively utilizing a specific file at that moment.

  2. Question 116 of 225Which command closes the terminal window?

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

    Show answer & explanation

    Correct answer: D. exit

    Typing the exit command terminates the current shell session and effectively closes the active terminal window. The other listed options are not recognized Linux commands, making exit the only logical choice on the exam.

  3. Question 117 of 225What does the term GPL stand for?

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

    Show answer & explanation

    Correct answer: B. General Public License

    GPL stands for General Public License, which is a widely used free software license. It guarantees end users the freedom to run, study, share, and modify the software.

  4. Question 118 of 225The output of the program date should be saved in the variable datenow. What is the correct statement to enter into the shell to set this variable?

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

    Show answer & explanation

    Correct answer: C. datenow=$(date)

    The datenow=$(date) syntax uses command substitution to execute the date command and store its output in the variable. Remember to avoid pipes for variable assignment, as they pass output between commands.

  5. Question 119 of 225After running a command to delete all of the files beginning with the letter "a", the file Access.txt remained. Assuming that the user had the correct ownership and permissions, why was Access.txt not deleted when the command was run?

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

    Show answer & explanation

    Correct answer: D. Linux file names are case sensitive

    Linux file names are case sensitive, so a pattern matching a lowercase a will ignore an uppercase A. To target both, you would need to use a bracket expansion like rm [aA] star on the command line.

  6. Question 120 of 225Which directory contains the files and directories automatically copied over to a new user's home directory when the account is first created?

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

    Show answer & explanation

    Correct answer: C. /etc/skel

    The slash etc slash skel directory acts as a template, automatically copying its default files into a new user home directory during account creation. This ensures standard configuration files are readily available for every new user.

  7. Question 121 of 225Which file is used to define all of the users on a Linux system?

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

    Show answer & explanation

    Correct answer: D. /etc/passwd

    The slash etc slash passwd file defines all user accounts on a Linux system by storing essential account information. It is a universally recognized plain text file that maps usernames to their corresponding user identifiers.

  8. Question 122 of 225Which of the following provides the correct syntax to search for lines ending with the given pattern using the grep command?

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

    Show answer & explanation

    Correct answer: D. pattern$

    In regular expressions, the dollar sign represents the end of a line, so grep matches the pattern immediately preceding it at the line's conclusion. The caret symbol is used to match the beginning of a line instead, which is a common distractor on the exam.

  9. Question 123 of 225Why is the file data.txt empty after executing sort data.txt > data.txt?

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

    Show answer & explanation

    Correct answer: C. Because the file gets truncated before sort is executed

    The file ends up empty because the shell processes the redirection first, truncating the destination file before the sort command executes. To avoid this data loss on the exam, remember to pipe the output into a temporary file instead.

  10. Question 124 of 225What symbol can be used to represent a single character within search criteria?

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

    Show answer & explanation

    Correct answer: B. ?

    The question mark is used to represent exactly one character in shell globbing patterns. Remember that the asterisk matches zero or more characters, while a period represents a single character only within regular expressions, not standard shell expansion.

  11. Question 125 of 225What command can be used to find the executable and man pages that exist for a given command?

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

    Show answer & explanation

    Correct answer: B. whereis

    The whereis command is specifically designed to locate the binary, source, and manual page files for a command. Do not confuse this with the which command, which only searches directories in your path to locate executable files.

  12. Question 126 of 225How do you perform a recursive directory listing from the command prompt?

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

    Show answer & explanation

    Correct answer: B. ls -R

    The ls command combined with the dash capital R flag performs a recursive directory listing, displaying all subdirectories and their contents. Watch out for Windows-style commands like dir or incorrect slash parameters that might appear as distractors.

  13. Question 127 of 225Which character represents the root directory?

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

    Show answer & explanation

    Correct answer: D. /

    The forward slash character represents the root directory, serving as the absolute top level of the Linux filesystem hierarchy. Every absolute path begins with this single slash, distinguishing it clearly from relative file paths.

  14. Question 128 of 225Which of the following is an interpreted, high-level, general-purpose programming language?

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

    Show answer & explanation

    Correct answer: C. Python

    Python is an interpreted, high-level, general-purpose programming language. The other options are either entirely fictional or represent made-up programming languages that do not fit this description.

  15. Question 129 of 225Which of the following is a mobile operating system based on a modified version of the Linux kernel designed primarily for touchscreen mobile devices?

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

    Show answer & explanation

    Correct answer: B. Android

    Android is a mobile operating system based on a modified version of the Linux kernel. It is designed primarily for touchscreen mobile devices such as smartphones and tablets.

  16. Question 130 of 225Which of the following programs on a Linux system could you use as a replacement for Microsoft Outlook?

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

    Show answer & explanation

    Correct answer: C. Thunderbird

    Mozilla Thunderbird is a free and open-source email client used in Linux. The other options are fabricated and do not represent actual email applications on the Linux platform.

  17. Question 131 of 225When the free command is run, what does the Mem: line reveal about the system?

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

    Show answer & explanation

    Correct answer: B. RAM statistics

    The Mem line in the free command output displays the total, used, and free random access memory. Use free -h on the exam if you need to read the memory statistics in a more human friendly format like megabytes or gigabytes.

  18. Question 132 of 225What is the symbolic representation of the octal numeric permission 644?

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

    Show answer & explanation

    Correct answer: C. rw-r--r--

    The octal permission 644 translates to read and write for the owner, and read only for the group and others. Remember the numeric scale for the exam where read is four, write is two, and execute is one.

  19. Question 133 of 225Which of the following commands will display a list of all files in the current directory, including those that may be hidden?

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

    Show answer & explanation

    Correct answer: A. ls -a

    The ls command with the dash a option displays all files, including hidden files that start with a dot. Options like dash hidden are invalid, while dash h just changes the output to a human readable format.

  20. Question 134 of 225Which of the following commands can be used to resolve a DNS name to an IP address?

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

    Show answer & explanation

    Correct answer: C. nslookup

    The nslookup command queries the Domain Name System to resolve domain names to their corresponding IP addresses. While tools like dig and host are also commonly tested for lookups, nslookup remains a classic utility for basic network troubleshooting tasks.

  21. Question 135 of 225Which of the following statements would be used for sending both standard output and standard error to the same location?

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

    Show answer & explanation

    Correct answer: D. 2>&1

    The redirection syntax two greater than and one redirects file descriptor two, standard error, to the same location as file descriptor one, standard output. This specific ordering is crucial for combining both streams when capturing command output or error logs.

  22. Question 136 of 225Which of the following is the file descriptor number used to represent the Standard Error (STDERR)?

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

    Show answer & explanation

    Correct answer: C. 2

    The standard error stream is represented by file descriptor number two. Standard input is zero and standard output is one, so memorize these default numbers as they are fundamental for shell redirection and pipeline operations.

  23. Question 137 of 225What option can be used with tail or head to specify the number of lines to display to the screen?

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

    Show answer & explanation

    Correct answer: A. -n

    The dash n option specifies the exact number of lines to display when using the head or tail commands. By default, these utilities only show ten lines, so understanding this option is essential for parsing large text files or logs.

  24. Question 138 of 225Which of the following options is used with tar to specify the filename of the tar archive?

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

    Show answer & explanation

    Correct answer: C. -f

    The dash f option tells the tar command to use a specific archive file, often required when creating or extracting backups. Without it, tar defaults to using a tape device, which is rarely used on modern local file systems.

  25. Question 139 of 225Which of the following commands could be used to connect to a remote server and execute some commands securely?

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

    Show answer & explanation

    Correct answer: B. ssh

    The ssh command establishes a secure, encrypted connection to a remote server, allowing interactive command execution over the network. Telnet performs a similar function but sends data in plain text, failing modern security requirements.

  26. Question 140 of 225Why are web browser cookies considered dangerous?

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

    Show answer & explanation

    Correct answer: C. Cookies support identification and tracking of users

    Cookies are considered dangerous to privacy because they support the identification and tracking of users across websites. While they do not typically exhaust disk space, their primary risk lies in silently compiling browsing habits and sensitive user data.

  27. Question 141 of 225Which of the following is NOT a Linux desktop environment?

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

    Show answer & explanation

    Correct answer: C. Dwarf

    Dwarf is not a recognized Linux desktop environment, making it the correct choice for an exception question. The exam expects you to easily identify major graphical environments like KDE, XFCE, and GNOME, which are all standard options.

  28. Question 142 of 225Which Linux file type holds a list of files rather than actual data?

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

    Show answer & explanation

    Correct answer: C. Directories

    Directories act as a special file type that contains a structured list of other files and subdirectories rather than raw data. Regular files hold the actual data, while special files represent hardware devices or sockets.

  29. Question 144 of 225What is the main difference between the desktop environments of Windows/Mac OS and Linux?

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

    Show answer & explanation

    Correct answer: A. Windows/Mac OS each have an inseparable desktop environment while Linux desktop environments are modular

    Windows and macOS have inseparable desktop environments, while Linux desktop environments are modular. This modularity allows users to mix and match components according to their preferences.

  30. Question 145 of 225What is the maximum amount of memory accessible by a 32-bit operating system?

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

    Show answer & explanation

    Correct answer: C. 4 GB

    A 32-bit operating system can theoretically access a maximum of 4GB of memory. If you need to utilize more memory, you must install a 64-bit version of the operating system.

  31. Question 146 of 225Which command shows who is logged on and what they are doing in the system?

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

    Show answer & explanation

    Correct answer: B. w

    The w command shows exactly who is logged in and lists their current running processes. Do not confuse this with the who command, which merely lists the logged in users without showing their active system activity.

  32. Question 147 of 225Which file on a Linux system is modified to set the maximum number of days before a password must be changed?

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

    Show answer & explanation

    Correct answer: B. /etc/shadow

    The slash etc slash shadow file stores secure user account data, including password aging details like maximum days between changes. While passwd holds basic user info, shadow manages the actual password policies and restrictions.

  33. Question 148 of 225Which of the following statements is TRUE for a Linux distribution used in an enterprise environment?

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

    Show answer & explanation

    Correct answer: B. These distributions contain software versions that have proven to be stable even when they are not the most recent version of the software available

    Enterprise distributions prioritize proven software stability over offering the newest features or package versions. Bleeding edge options risk downtime and business interruptions, so administrators rely on older, heavily tested releases.

  34. Question 149 of 225You have downloaded a large Linux distribution as an ISO that requires 3 GB of installation files. You want to perform the install from an optical drive. What type of disc should you burn the ISO file onto?

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

    Show answer & explanation

    Correct answer: B. DVD

    A standard single-layer DVD provides about four point seven gigabytes of storage capacity, which easily accommodates a three-gigabyte installation image. A standard CD only holds around seven hundred megabytes, making it far too small for modern Linux distribution ISO files.

  35. Question 150 of 225What is used as a placeholder for an unknown value in a script, and its value is then calculated or determined when the script is executed?

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

    Show answer & explanation

    Correct answer: A. Variable

    A variable acts as a placeholder for dynamically determined values, which are evaluated when the script runs. Functions and pipelines handle execution control or data flow rather than storing specific unknown string values.

  36. Question 151 of 225Which of the following is a piece of software that listens for network requests and responds to them?

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

    Show answer & explanation

    Correct answer: A. Apache

    Apache HTTPD is a web server daemon that listens for network requests and responds to them. The other choices are entirely fictional software applications designed to act as distractors.

  37. Question 152 of 225You have just installed a wireless network adapter in your Linux system, but you cannot connect to the wireless network. What is most likely the problem?

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

    Show answer & explanation

    Correct answer: C. You didn't install the right driver for the device

    If a newly installed wireless adapter fails to connect, you likely did not install the right driver. Linux distributions do not always include proprietary drivers out of the box for every hardware device.

  38. Question 153 of 225Which of the following files contains a mapping of IP addresses to URLs locally on your Linux machine?

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

    Show answer & explanation

    Correct answer: A. /etc/hosts

    The slash etc slash hosts file maps IP addresses to host names locally on the machine. Technically it maps to host names rather than full URLs, but it is the only correct local resolution file provided here.

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