LPI
LPI Linux Essentials
Question 38 of 225Which command-line tool will create a filename that ends in .gz?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. gzip
The gzip command compresses files and appends the dot g z extension to the resulting archive. Note that bzip two and x z create dot b z two and dot x z files respectively.
Question 39 of 225You are in a directory that contains several hidden files. Which command should you use to display hidden files in the current directory?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. ls -a
Using the l s dash a flag lists all files, including hidden configuration files that start with a dot. Standard l s only displays non hidden files, ignoring essential dot files.
Question 40 of 225What is defined by a Free Software license?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. The conditions for modifying and distributing the licensed software
A Free Software license defines how users can legally modify and distribute the software. Remember that true free software focuses on user liberties rather than restricting the context of its execution.
Question 41 of 225What command would a user enter to delete a directory containing no other files or directories within it?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. rmdir
The rmdir command is specifically used to remove empty directories from the file system. If you need to delete a directory that contains files or other directories, you must use rm with the recursive flag.
Question 42 of 225What must the user do to run a program that is not within a directory located in the PATH variable?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. include the file path to the program
If an executable is not in a directory listed in your PATH variable, you must provide its explicit file path to run it. A common shortcut for this is using dot slash to execute a script in your current directory.
Question 43 of 225Which command line can be used to search help files that mention the word 'copy'?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. man -k copy
The dash k option for the man command acts exactly like the apropos command. It searches short manual page descriptions for keywords and displays any matches.
Question 44 of 225Which of the following information can be displayed by top?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Running processes, ordered by CPU or RAM consumption
The top command displays running system processes and their resource usage, like CPU and RAM. For the exam, remember that top provides a real time dynamic view of your system, whereas other tools only display user or hardware summaries.
Question 45 of 225Which of the following options is used with tar to create a new .tar archive file?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. -c
The dash c option tells tar to create a new archive file. For the exam, pair dash c with dash f to specify the output filename, such as tar dash c f archive dot tar.
Question 46 of 225Which of the following programs on a Linux system could you use instead of Windows Media Player?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. VLC
VLC is a highly popular cross-platform media player that runs on Linux. For the exam, remember that Linux relies on open-source applications for multimedia tasks, unlike proprietary options limited to their native operating systems.
Question 47 of 225What is the main difference between Linux and Windows or macOS?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Linux is open source software while the other two are closed source operating systems
Linux is an open-source operating system, whereas Windows and macOS are proprietary, closed-source systems. While cost and installation methods vary, the underlying licensing and source code availability remain the key distinctions.
Question 48 of 225What is the practice of offering people the right to freely distribute copies and modified versions of a work with the stipulation that the same rights be preserved in derivative works created later called?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Copyleft
Copyleft is the practice of allowing free distribution and modification while requiring the same rights for derivative works. Copyright is the default legal framework, but copyleft uses it to enforce open sharing.
Question 49 of 225Which of the following is NOT a heightened value proposition of Open Source Software compared to proprietary software?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Popularity
While open-source software can be highly popular, popularity itself is not an inherent value proposition. The key benefits tested are transparency, interoperability, security, and the ability to localize the software for specific needs.
Question 50 of 225When using a web browser, what should a user do to prevent private data from being stored locally?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Browsers can be configured to use a private mode that does not store any data locally
Most modern browsers feature a private browsing mode that prevents history and local data from being saved. You do not need to delete profiles or seek special secure versions to achieve this basic privacy function.
Question 51 of 225Which of the following commands can search for executable programs or scripts located in the PATH variable?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 52 of 225Which keyboard shortcut allows copying highlighted text while working in the command line terminal?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 53 of 225Which command can be used to search help files that mention the word "copy"?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 54 of 225Your 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?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 55 of 225Which option can be used with tail to print the last X bytes of a file to the screen?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 56 of 225Which of the following is the file descriptor number used to represent Standard In (STDIN)?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 57 of 225Which of the following is the file descriptor number used to represent Standard Out (STDOUT)?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 58 of 225Which command is used to print the full contents of a file to the screen at once?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 59 of 225Which redirection operator accepts text on the following lines as standard input?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 60 of 225Which of the following is used as a virtual or pseudo filesystem used to interface with the kernel and processes?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 61 of 225You 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?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 62 of 225Which of the following commands will create a single directory named dir1 dir2?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 63 of 225Which 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?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct 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.
Question 64 of 225What column tells the "w" program which session is running?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. WHAT
The WHAT column in the w command output displays the specific process or program currently running in that user session. Do not confuse this with the USER or TTY columns, which only show login details.
Question 65 of 225Which UID is usually used to represent the first regular user on a Linux system?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. 1000
Modern Linux distributions typically reserve identifiers starting from one thousand for regular user accounts. Lower numbers are designated for system processes and core services.
Question 66 of 225Which command would be used to change the owner of foo1.txt from jasondion to administrator?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. chown
The chown command modifies file and directory ownership, requiring administrative privileges. Remember that chmod is used separately when you need to adjust file permissions rather than ownership.
Question 67 of 225Which of the following is NOT contained in the /etc/passwd file?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. The password of the user's account
The passwd file contains account information but holds only a placeholder in the password field. Actual encrypted passwords are securely stored in the restricted shadow file instead.
Question 68 of 225Which command is used to change the password of a user's account?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. passwd
The passwd utility updates a user authentication tokens and changes account passwords. Be careful not to confuse this command with pwd, which simply displays your current directory path.
Question 69 of 225Which option can be used with useradd to specify the home directory for a user?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. -d
The dash d flag sets a specific home directory path when creating a new user account. In contrast, the dash c flag only adds descriptive comment fields like the user full name.
Question 70 of 225Where should temporary files be stored on a Linux system that can be safely deleted during a reboot?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. /tmp
The root level temporary directory is explicitly designed to be cleared during system reboots. Conversely, temporary files kept in the var directory are preserved across system restarts.
Question 71 of 225Which of the following commands will output all of the lines with the name Fred in upper or lower case but not the word red from the file data_file?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. grep '[Ff]red' data_file
Using bracket notation with uppercase and lowercase characters directly inside the search pattern catches both variations. Relying on basic flag searches without this notation misses the uppercase spelling.
Question 72 of 225Which of the following regular expressions matches lines beginning with the given pattern using the grep command?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. ^pattern
The caret symbol anchors the search to the start of a line, ensuring it only matches text that begins with your pattern. The dollar sign anchors to the end of a line instead.
Question 73 of 225Which version of Linux should be installed on a system with a 32-bit processor?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. x86
A system with a 32 bit processor requires an operating system compiled for the x86 architecture. The x64 architecture is strictly for 64 bit processors and cannot run on older 32 bit hardware.
Question 74 of 225Which of the following directories contains all of the installed kernels on your system and their needed drivers?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. /boot
The boot directory contains the Linux kernel images and files needed during the startup process. The actual driver modules are stored separately under lib modules, making this option slightly imprecise.
Question 75 of 225Which file on a Linux system contains the passwords for each user on the system?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. /etc/shadow
Encrypted user passwords are stored in the highly restricted shadow file. The passwd file contains basic account details but only holds a placeholder character where the password used to be.
Study on mobile
Get CertPunch for iOS or Android.