Skip to content

LPI

LPI Linux Essentials

Exam 3 · 38 questions · Choose another exam

  1. Question 76 of 225How is it possible to determine if an executable file is a shell script read by Bash?

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

    Show answer & explanation

    Correct answer: B. The first line starts with #!/bin/bash.

    A bash script is identified by its shebang line, which starts with hash exclamation slash bin slash bash. Linux ignores file extensions, so the dot s h suffix is just a human convention and not required by the system.

  2. Question 77 of 225Which of the following programs on a Linux system could you use as a replacement for Adobe Photoshop?

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

    Show answer & explanation

    Correct answer: B. Gimp

    GIMP is the correct answer because it is a widely used open source graphics editor that competes with Adobe Photoshop. For the exam, remember that common Linux desktop applications often mirror proprietary software, such as using LibreOffice for word processing.

  3. Question 78 of 225Which is NOT a Linux distribution?

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

    Show answer & explanation

    Correct answer: D. Torvalds

    Torvalds is correct because it refers to Linus Torvalds, the creator of the Linux kernel, rather than an actual operating system distribution. Knowing the major distributions, such as Debian, openSUSE, and CentOS, is essential for exam success.

  4. Question 79 of 225Which of the following programs on a Linux system could you use as a replacement for Microsoft PowerPoint?

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

    Show answer & explanation

    Correct answer: D. Impress

    LibreOffice Impress is the correct answer because it is the standard open source presentation software used as a replacement for Microsoft PowerPoint. For the exam, familiarize yourself with the LibreOffice suite equivalents for common proprietary applications.

  5. Question 80 of 225Which Linux distribution is used as a basis for the creation of Ubuntu Linux?

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

    Show answer & explanation

    Correct answer: D. Debian

    Debian is the correct answer because Ubuntu is a popular Linux distribution built directly upon the Debian architecture. Understanding these family relationships between distributions, such as Ubuntu deriving from Debian, is crucial for the exam.

  6. Question 81 of 225You are working on a script that requires combining the contents of two text files, file1.txt and file2.txt into a single output on the terminal. Which command should you use?

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

    Show answer & explanation

    Correct answer: C. cat

    The cat command, derived from concatenate, reads multiple files and outputs their combined contents sequentially to the terminal. Commands like less or head are used for viewing files interactively or partially, not for combining multiple files.

  7. Question 82 of 225What symbol can be used to represent none, one, or multiple characters within search criteria?

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

    Show answer & explanation

    Correct answer: A. *

    The asterisk is used in shell globbing to match zero, one, or many characters. On the exam, remember that the question mark matches exactly one character, while the asterisk matches any number of characters.

  8. Question 83 of 225Which command would a user type to create a new file within the current directory?

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

    Show answer & explanation

    Correct answer: D. touch

    The touch command is the standard utility used to create a new empty file in Linux. If the specified file already exists, touch simply updates its modification and access times rather than overwriting it.

  9. Question 84 of 225Which command is used to copy files from one directory to another?

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

    Show answer & explanation

    Correct answer: C. cp

    The cp command stands for copy and is used to duplicate files from one location to another. Remember that mv moves or renames files, while rm deletes them, and copy is not a valid command.

  10. Question 85 of 225Which of the following is true about a recursive directory listing?

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

    Show answer & explanation

    Correct answer: B. It includes the content of sub-directories

    A recursive directory listing displays the contents of the target directory as well as all of its subdirectories. On the exam, associate the capital R flag with ls for recursive operations.

  11. Question 86 of 225You have been asked to create a script that will present the user with an onboard menu in which they can select 4 different commands to run by entering 1, 2, 3, or 4. Which of the following statements should you use to create the simplest and most effective method of choosing the command to run based on the user's input?

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

    Show answer & explanation

    Correct answer: B. case

    A case statement is the most efficient choice for matching a specific variable against a list of specific values like menu selections. While nested if statements can technically work, they become clumsy and hard to read.

  12. Question 87 of 225Which of the following options is used to gzip a file called filename?

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

    Show answer & explanation

    Correct answer: B. gzip filename

    Running gzip followed by a filename compresses the file and appends a dot g z extension by default. The hyphen c flag is used to write to standard output, and hyphen z is used for tar, not gzip.

  13. Question 88 of 225Which command line tool is used to compress a single file using the Burrows-Wheeler algorithm?

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

    Show answer & explanation

    Correct answer: D. bzip2

    The bzip2 command specifically compresses single files using the Burrows-Wheeler block sorting algorithm and Huffman coding. To easily remember this on the exam, gzip and xz use different algorithms, while tar is strictly an archiving tool that often pairs with them.

  14. Question 89 of 225How can the normal output of 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

    Redirecting standard error to dev null immediately discards those error messages, while sending standard output to a file saves it. Standard error is represented by the file descriptor number two, which makes the two right angle bracket dev null syntax essential.

  15. Question 90 of 225Which GID is usually used to represent the root group on a Linux system?

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

    Show answer & explanation

    Correct answer: A. 0

    The root group is always represented by the group identifier zero. Just as the root user account has user identifier zero, assigning zero to the primary group ensures the highest level of administrative system access.

  16. Question 91 of 225Which of the following answers is true for cloud computing?

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

    Show answer & explanation

    Correct answer: A. Cloud Computing provides new tools to manage IT resources

    Cloud computing introduces new paradigms and tools for managing information technology resources efficiently. The other options present false assumptions, as moving to the cloud does not automatically mean downsizing your department or sharing data publicly.

  17. Question 92 of 225Which of the following is the UNIX device name for a physical or virtual terminal connection?

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

    Show answer & explanation

    Correct answer: D. tty

    The term tty represents teletypewriter and serves as the standard Unix device name for physical or virtual terminal connections. Knowing this historical abbreviation is a practical cue for identifying command line interface environments in Linux.

  18. Question 93 of 225Which of the following is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management by the user?

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

    Show answer & explanation

    Correct answer: C. Cloud Computing

    Cloud computing provides on demand availability of computer system resources like data storage and computing power without direct active management. While other terms sound plausible, cloud computing is the industry standard term you need to know.

  19. Question 94 of 225Which command is used to rename a file on Linux?

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

    Show answer & explanation

    Correct answer: C. mv

    The mv command is the standard utility used to both move and rename files within Linux. While a separate rename command exists, mv is the fundamental POSIX tool you must master for basic file manipulation on the exam.

  20. Question 95 of 225Which of the following is true about environment variable names by convention?

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

    Show answer & explanation

    Correct answer: A. Contains all uppercase letters

    Environment variables are conventionally named using all uppercase letters to distinguish them from regular local shell variables. This naming convention helps system administrators and users easily identify system configurations like PATH or USER.

  21. Question 96 of 225What does the "rm -rf" command do in Linux?

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

    Show answer & explanation

    Correct answer: A. Remove all the files in the directory and subdirectories

    The rm command with the recursive and force flags removes all files within a directory and its subdirectories without prompting. The lowercase r makes it traverse directories, while the f forces the action by ignoring non-existent files and overrides.

  22. Question 97 of 225Which of the following commands increases the number of files within a directory?

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

    Show answer & explanation

    Correct answer: C. touch newfile

    The touch command updates timestamps, but if the file does not exist, it creates a new empty file, thereby increasing the file count. The create command is not a standard utility, and rmdir removes directories.

  23. Question 98 of 225What keyword should be used to fill in the blank in the following segment of the given shell script?for i in *; _____ cat $i done

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

    Show answer & explanation

    Correct answer: A. do

    In bash scripting, a for loop requires the do keyword before the commands you want to execute. Remember the basic loop structure is for, followed by do, and ending with done.

  24. Question 99 of 225Which of the following statements may be used to access the second command line argument to a script?

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

    Show answer & explanation

    Correct answer: B. $2

    Inside a script, the dollar sign followed by a number references positional parameters from the command line. For your exam, remember that dollar one is the first argument, while dollar two captures the second argument passed to the script.

  25. Question 100 of 225Which command can be used to display the contents of multiple files to the screen at once?

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

    Show answer & explanation

    Correct answer: C. cat

    The cat command concatenates files and reads their contents sequentially to standard output. While head and tail are useful for viewing specific file sections, only cat seamlessly streams multiple complete files to the screen at once.

  26. Question 102 of 225What is NOT one of the ways that DHCP can be used to deliver IP addresses?

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

    Show answer & explanation

    Correct answer: D. Permanent

    Dynamic Host Configuration Protocol address allocation is strictly categorized into manual, automatic, and dynamic methods. The term permanent is not an allocation type, though automatic allocation effectively assigns a permanent address to a client.

  27. Question 103 of 225What is a set of standards that underlie most modern network communications at the software level?

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

    Show answer & explanation

    Correct answer: C. TCP/IP

    Transmission Control Protocol and Internet Protocol provide the foundational software networking standards for modern communication. For the exam, remember that while Wi-Fi is a hardware technology, this protocol suite handles the actual software routing.

  28. Question 104 of 225Which storage device would be listed as /dev/sdb in Linux?

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

    Show answer & explanation

    Correct answer: B. 2nd hard drive

    Linux assigns drive letters sequentially starting from the letter A. Therefore, the first drive is SDA, making SDB consistently represent the second registered hard drive detected by the system.

  29. Question 105 of 225Which network interface always exists in a Linux system?

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

    Show answer & explanation

    Correct answer: A. lo

    The loopback interface provides internal networking for the operating system to communicate with itself. It is virtually always present, whereas interfaces like eth0 or wlan0 strictly depend on having physical networking hardware installed.

  30. Question 106 of 225Which of the following is used as a virtual or pseudo filesystem used to interface with the kernel and system as a whole but not with individual processes?

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

    Show answer & explanation

    Correct answer: C. /sys

    The sysfs pseudo filesystem mounts at sys and specifically structures kernel and hardware information. A key exam takeaway is that proc traditionally handles individual process data, while sys organizes global device and kernel details.

  31. Question 107 of 225Which of the following is the filesystem for a CD-ROM?

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

    Show answer & explanation

    Correct answer: D. isofs

    The isofs module is used by Linux to support the ISO 9660 filesystem, which is the standard for optical discs like CD-ROMs. For the exam, remember that ext2 is for disks, procfs is for kernel data, and isofs handles optical media.

  32. Question 108 of 225Which of the following is NOT TRUE about the Linux Distribution Life cycle?

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

    Show answer & explanation

    Correct answer: A. Linux distros are always short term releases

    Many Linux distributions offer both short-term releases and long-term support versions, meaning they are not exclusively short-term. Recognizing the difference between LTS and standard releases is a key part of understanding the software lifecycle.

  33. Question 109 of 225Which of the following commands is used to view memory usage on a system?

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

    Show answer & explanation

    Correct answer: A. free

    The free command reports the total amount of free and used physical and swap memory on the system. Note that ps only shows process snapshots, while route and netstat manage networking details rather than hardware memory statistics.

  34. Question 110 of 225Which of the following commands can be used to change default permissions for files and directories at the time of creation?

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

    Show answer & explanation

    Correct answer: B. umask

    The umask command defines the default permission mask applied to newly created files and directories. Remember that chmod modifies existing permissions, whereas chown and chgrp alter file ownership rather than creation masks.

  35. Question 111 of 225Which option can be used with useradd to create a new user without a home directory?

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

    Show answer & explanation

    Correct answer: C. -M

    The capital M option tells the useradd command to create a new user account without creating a home directory. Conversely, the lowercase m option explicitly instructs the system to generate the home directory.

  36. Question 112 of 225What does the letter t at the end of drwxrwxrwt indicate within the following directory permissions? drwxrwxrwt 14 root root 36864 2012-03-02 11:17 /tmp

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

    Show answer & explanation

    Correct answer: A. The t is used to show that the directory is globally writable, but only the owner can delete their own files within the directory

    The letter t represents the sticky bit, which restricts file deletion within a shared directory. Even if multiple users have write access to the directory, only the file owner, directory owner, or root user can delete files there.

  37. Question 113 of 225What command is used to change the group ownership of a file?

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

    Show answer & explanation

    Correct answer: C. chgrp

    The chgrp command modifies the group ownership associated with a file or directory. You can memorize this easily because chgrp stands for change group, differentiating it from chown, which typically changes the user owner.

  38. Question 114 of 225Which of the following ways would NOT allow a user to perform a command-line task that requires root privileges?

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

    Show answer & explanation

    Correct answer: B. Disabling firewall and force open a directory, file, or folder

    Disabling a firewall does not grant a user administrative command-line rights, as elevated privileges require tools like sudo or su. The suggested action involves modifying network security rather than altering user authorization levels.

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