Verified 010-160 Dumps Q&As - 010-160 Test Engine with Correct Answers [Q38-Q61]

Share

Verified 010-160 Dumps Q&As - 010-160 Test Engine with Correct Answers

Pass Your 010-160 Dumps as PDF Updated on 2026 With 80 Questions


The Lpi 010-160 exam covers a wide range of topics related to Linux, including system architecture, installation and package management, GNU and Unix commands, devices, Linux file systems, and security. 010-160 exam is delivered in a multiple-choice format and consists of 40 questions that must be completed within 60 minutes. The passing score for the exam is 66%, and individuals who pass the exam receive the Linux Essentials Certificate, which is recognized globally by employers and organizations in the IT industry.

 

NEW QUESTION # 38
Which of the following commands shows the absolute path to the current working directory?

  • A. ls -l
  • B. cd ~/home
  • C. pwd
  • D. who
  • E. cd ..

Answer: C

Explanation:
The command pwd stands for "print working directory". It will print the absolute path of the current working directory to the terminal. For example, if we are currently in the /home/user/directory, it will print out that exact path1. The pwd command is useful for finding out where we are in the file system hierarchy and for verifying the location of files and directories2.
The other options are not commands that show the absolute path to the current working directory. The who command shows the users who are currently logged in to the system3. The cd ... command changes the current working directory to the parent directory of the current one2. The ls -l command lists the files and directories in the current working directory in a long format, which shows the permissions, ownership, size, date, and name of each file and directory2. The cd ~/home command changes the current working directory to the /home directory under the user's home directory, which may or may not exist2. Reference:
Linux Essentials Exam Objectives, Version 1.6, Topic 103.1, Weight 2
Linux Essentials Certification Guide, Chapter 3, Page 51-52
How to Get the current directory in Linux - howtouselinux
How To Find The Absolute Path Of A File Or Directory In Linux - systranbox


NEW QUESTION # 39
What is the return value of a shell script after successful execution?

  • A. 0
  • B. 1
  • C. 2
  • D. 3
  • E. 4

Answer: A

Explanation:
The return value of a shell script after successful execution is 0. This is a convention followed by most UNIX and Linux commands, programs, and utilities. A return value of 0 indicates that the command or script completed successfully, without any errors. A return value of non-zero (1-255) indicates that the command or script failed, and the value can be interpreted as an error code. The return value of a command or script is stored in the special variable $? and can be used to test the outcome of a command or script123. For example, the following script will print a message based on the return value of the ls command:
#!/bin/bash ls if [ $? -eq 0 ]; then echo "ls command executed successfully" else echo "ls command failed" fi


NEW QUESTION # 40
Which of the following directories contains information, documentation and example configuration files for installed software packages?

  • A. /usr/examples/
  • B. /doc/
  • C. /var/info/
  • D. /usr/share/doc/
  • E. /etc/defaults/

Answer: D

Explanation:
The /usr/share/doc/ directory is the standard location for documentation files for installed software packages on Linux systems12. It contains subdirectories for each package, which may include README files, manuals, license information, changelogs, examples, and other useful resources12. The /usr/share/doc/ directory is part of the Filesystem Hierarchy Standard (FHS), which defines the structure and layout of files and directories on Linux and other Unix-like operating systems3.
The other options are incorrect because:
/etc/defaults/ is a directory that contains settings for userland applications or services/daemons4.
/var/info/ is not a standard directory on Linux systems. The /var/ directory is used for variable data files, such as logs, caches, spools, and temporary files3.
/doc/ is not a standard directory on Linux systems. The / directory is the root of the filesystem hierarchy and contains essential files and directories for booting, restoring, recovering, and/or repairing the system3.
/usr/examples/ is not a standard directory on Linux systems. The /usr/ directory is used for shareable, read-only data, such as binaries, libraries, documentation, and source code3.
Reference:
Linux configuration: Understanding *.d directories in /etc | Enable Sysadmin Configuration Files in Linux | Baeldung on Linux Filesystem Hierarchy Standard - Wikipedia Which of the Following Directories Contains Information, Documentation ...


NEW QUESTION # 41
Which of the following commands creates the ZIP archive poems.zip containing all files in the current directory whose names end in .txt?

  • A. zip *.txt > poems.zip
  • B. zip cfz poems.zip *.txt
  • C. cat *.txt | zip poems.zip
  • D. zip poems.zip *.txt
  • E. zcat *.txt poems.zip

Answer: D

Explanation:
The zip command is used to create compressed archive files that can contain one or more files or directories. The zip command takes the name of the archive file as the first argument, followed by the names of the files or directories to be included in the archive. You can also use wildcards to match multiple files or directories with a common pattern. For example, the command zip poems.zip *.txt will create the ZIP archive poems.zip containing all files in the current directory whose names end in .txt. The other commands are either invalid or do not perform the desired operation. The command zip *.txt > poems.zip will try to create an archive for each file ending in .txt and redirect the output to poems.zip, which is not a valid archive file. The command zcat *.txt poems.zip will try to decompress and concatenate the contents of the files ending in .txt and poems.zip, which is not a valid ZIP file. The command zip cfz poems.zip *.txt will fail because the options c, f, and z are not valid for the zip command. The command cat *.txt | zip poems.zip will try to read the contents of the files ending in .txt from the standard input and create an archive named poems.zip, but this will not preserve the file names or attributes of the original files. Reference:
Linux Essentials - Linux Professional Institute (LPI), section 3.1.1
3.1 Archiving Files on the Command Line - Linux Professional Institute Certification Programs, slide


NEW QUESTION # 42
Which of the following devices represents a hard disk partition?

  • A. /dev/ttyS0
  • B. /dev/part0
  • C. /dev/sda2
  • D. /dev/sata0
  • E. /dev/sda/p2

Answer: C

Explanation:
Explanation
The correct device name that represents a hard disk partition is /dev/sda2. This device name follows the Linux convention for naming hard disk devices and partitions. According to this convention123:
* The first part of the device name indicates the type of the device. For example, /dev/hd* for IDE drives,
/dev/sd* for SCSI, SATA, USB, or eSATA drives, /dev/nvme* for NVMe drives, etc.
* The second part of the device name indicates the order of the device as detected by the system. For example, /dev/sda is the first serial drive, /dev/sdb is the second serial drive, and so on.
* The third part of the device name indicates the number of the partition on the device. For example,
/dev/sda1 is the first partition on the first serial drive, /dev/sda2 is the second partition on the first serial drive, and so on.
Therefore, /dev/sda2 means the second partition on the first serial drive, which is a valid hard disk partition.
The other options are not valid hard disk partitions, because they do not follow the Linux convention. For example:
* /dev/ttyS0 is a serial port device, not a hard disk device4.
* /dev/sata0 is not a valid device name, because it does not specify the partition number. It should be something like /dev/sata0p1 or /dev/sata0p2, etc.
* /dev/part0 is not a valid device name, because it does not specify the device type or the partition number. It should be something like /dev/sdXp0 or /dev/hdXp0, etc.
* /dev/sda/p2 is not a valid device name, because it uses a slash (/) instead of a number to indicate the partition. It should be something like /dev/sda2 or /dev/sda3, etc.
References: 1: Hard drive/device partition naming convention in Linux - Unix & Linux Stack Exchange 2:
Hard drive partition naming convention in Linux - Ask Ubuntu 3: C.4. Device Names in Linux - Debian 4:
What is /dev/ttyS0? - Quora


NEW QUESTION # 43
Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.100.165 stored on a DNS server?

  • A. In the RNAME record for198-51-100-165.rev.arpA.
  • B. In the REV record forarpA.in-addr.198.51.100.165.
  • C. In the ARPA record for165.100.51.198.rev.
  • D. In the A record for165.100.51.198.ipv4.arpA.
  • E. In the PTR record for165.100.51.198.in-addr.arpA.

Answer: E


NEW QUESTION # 44
Which command displays file names only and no additional information?

  • A. ls -l
  • B. ls -a
  • C. ls -nl
  • D. ls -lh
  • E. ls -alh

Answer: B

Explanation:
The ls command is used to list the files and directories in a given path. By default, the ls command displays only the file names, without any additional information. However, the ls command can also take various options to modify its output. For example, the -l option tells ls to display the long format, which includes the file permissions, owner, group, size, date, and name. The -h option tells ls to display the file sizes in a human-readable format, such as KB, MB, GB, etc. The -a option tells ls to display all files, including the hidden ones that start with a dot (.). The -n option tells ls to display the numeric user ID and group ID instead of the user name and group name. Therefore, the only option that does not add any additional information to the file names is the -a option. The command ls -a will display all the file names in the current directory, including the hidden ones, but nothing else. Reference:
Linux Essentials - Linux Professional Institute (LPI), section 2.1.1
2.1 Lesson 1 - Linux Professional Institute Certification Programs, slide 6.


NEW QUESTION # 45
What is true about thedmesgcommand? (Choose two correct answers.)

  • A. It immediately outputs all new messages written to the system journal.
  • B. It might not display older information because it was overwritten by newer information.
  • C. It sends messages to the command lines of all current user sessions.
  • D. It displays the content of the Linux kernel's ring buffer.
  • E. It traces the execution of a command and shows each step the program carries out.

Answer: B,D


NEW QUESTION # 46
What is true about a recursive directory listing?

  • A. It includes the permissions of the directory listed.
  • B. It includes a preview of content for each file in the directory.
  • C. It includes details of file system internals, such as inodes.
  • D. It includes ownership information for the files.
  • E. It includes the content of sub-directories.

Answer: E

Explanation:
Explanation
A recursive directory listing is a way of displaying the files and folders in a directory and all its sub-directories. The recursive option can be used with various commands, such as ls, find, or dir, to list the files recursively. For example, the command ls -R will list all the files and folders inthe current directory and any sub-directories, showing the hierarchy of the file system123 A recursive directory listing does not include the permissions, ownership, or file system details ofthe files, unless specified by other options. For example, the command ls -lR will list the files recursively and also show the permissions, ownership, size, and modification date of each file1 A recursive directory listing also does not include a preview of the content of each file, unless specified by other options. For example, the command ls -R --file-type will list the files recursively and also show the file type indicator, such as / for directories, * for executable files, @ for symbolic links, etc1 References: 1: ls (Unix) - Wikipedia 2: Recursively List all directories and files - Stack Overflow 3: Why is ls -R called "recursive" listing? - Ask Ubuntu


NEW QUESTION # 47
What command displays manual pages? (Specify ONLY the command without any path or parameters.)

Answer:

Explanation:
man Explanation The command that displays manual pages for Linux commands is the man command. The man command is used to display the manual pages for a given command or topic. For example, to view the manual page for the ls command, you can type:
man ls
This will open the manual page for the ls command in a pager, which allows you to scroll and search through the text. You can also specify the section number of the manual page if there are multiple pages with the same name. For example, to view the manual page for the passwd command in section 1, you can type:
man 1 passwd
The man command is one of the most useful and important commands for learning and using Linux. It provides detailed information about the syntax, options, arguments, examples, and other aspects of a command or topic. You can also use the --help option to get a brief summary of the usage and options of a command. For example, to get a quick help for the man command, you can type:
man --help
To learn more about the man command and how to use it effectively, you can refer to the following resources:
* Linux Essentials Exam Objectives, Version 1.6, Topic 103.1, Weight 2
* Linux Essentials Certification Guide, Chapter 3, Page 51-52
* How to Access Manual Pages for Linux Commands - Linux Tutorials - Learn Linux Configuration
* How to Easily Read a Linux Man Page - Make Tech Easier


NEW QUESTION # 48
Which of the following directories must be mounted with read and write access if it resides on its own dedicated file system?

  • A. /usr
  • B. /opt
  • C. /lib
  • D. /etc
  • E. /var

Answer: E


NEW QUESTION # 49
FILL in BLANK
What keyword is used in a shell script to begin a loop? (Specify one keyword only, without any additional information.)

Answer:

Explanation:
for
Explanation:
The keyword for is used in a shell script to begin a loop that iterates over a list of items or a range of numbers. The syntax of the for loop is as follows:
for <var> in <list> do <commands> done
The variable <var> is assigned to each element of the <list> in turn, and the <commands> are executed for each iteration. The <list> can be a sequence of words, numbers, filenames, or other values. If the <list> is omitted, the for loop will iterate over the positional parameters ($1, $2, ...). The do and done keywords mark the beginning and the end of the loop body, respectively. The for loop is one of the three types of loops in shell scripting, along with the while and until loops. Reference: 1: Looping Statements | Shell Script - GeeksforGeeks 1 2: unix - Shell script "for" loop syntax - Stack Overflow 2 3: For Loop Shell Scripting - javatpoint 3


NEW QUESTION # 50
Which package management tool is used in Red Hat-based Linux Systems?

  • A. packagectl
  • B. portage
  • C. dpkg
  • D. apt-get
  • E. rpm

Answer: E


NEW QUESTION # 51
What is the UID of the user root?

  • A. 0
  • B. 1
  • C. 2
  • D. 3
  • E. 4

Answer: A

Explanation:
Explanation
The UID of the user root is always 0 on Linux systems. This is because the kernel uses the UID 0 to check for the superuser privileges and grant access to all system resources. The name of the user account with UID 0 is usually root, but it can be changed or have aliases. However, some applications may expect the name root and not work properly with a different name. The UID 0 is reserved for the root user and cannot be assigned to any other user. The UID 0 is stored in the /etc/passwd file along with other user information. References:
* Linux Essentials Topic 104: The Linux Operating System, section 104.4: Runlevels and Boot Targets.
* Linux Essentials Topic 106: Security and File Permissions, section 106.1: Basic security and identifying user types.
* Linux Essentials Topic 106: Security and File Permissions, section 106.2: Creating users and groups.


NEW QUESTION # 52
Which package management tool is used in Red Hat-based Linux Systems?

  • A. packagectl
  • B. portage
  • C. dpkg
  • D. apt-get
  • E. rpm

Answer: E

Explanation:
RPM stands for RPM Package Manager (formerly known as Red Hat Package Manager), which is a powerful, command-line package management tool developed for the Red Hat operating system. It is now used as a core component in many Linux distributions such as CentOS, Fedora, Oracle Linux, openSUSE and Mageia1. RPM can install, uninstall, and query individual software packages, but it cannot manage dependency resolution like YUM2. YUM is another package management tool that is based on RPM and can handle dependencies automatically. YUM is the primary package management tool for installing, updating, removing, and managing software packages in Red Hat Enterprise Linux2. Therefore, the correct answer is B. rpm, as it is the underlying package management tool used in Red Hat-based Linux systems. Reference:
Linux package management with YUM and RPM | Enable Sysadmin
Chapter 13. Package Management Tool Red Hat Enterprise Linux 5 | Red Hat Customer Portal Difference Between YUM and RPM | 2DayGeek


NEW QUESTION # 53
Which of the following commands sets the variable USERNAME to the value bob?

  • A. USERNAME=bob
  • B. set USERNAME bob
  • C. var USERNAME=bob
  • D. USERNAME<=bob
  • E. $USERNAME==bob

Answer: A

Explanation:
Explanation
The correct command to set the variable USERNAME to the value bob is USERNAME=bob. This command assigns the string bob to the variable name USERNAME, using the equal sign (=) as the assignment operator.
There is no space around the equal sign, and the variable name and value are case-sensitive. This command sets a shell variable, which is only valid in the current shell session. To make the variable an environment variable, which can be inherited by child processes and subshells, you need to use the export command, such as export USERNAME=bob. The other commands are not valid for setting variables in Linux. The set command is used to set orunset shell options and positional parameters, not variables. The $ sign is used to reference the value of a variable, not to assign it. The == sign is used for comparison, not assignment. The var keyword is not used in Linux, but in some other programming languages. The <= sign is used for redirection, not assignment. References:
* Linux Essentials - Linux Professional Institute (LPI)
* How to Set and List Environment Variables in Linux | Linuxize


NEW QUESTION # 54
Which permissions are set on a regular file once thepermissions have been modified with the command chmod 654 file.txt?

  • A. d-wxr-x--
  • B. drw-r-xr--
  • C. -rwxrw---x
  • D. -rw-r-xr--
  • E. -wxr-x--x

Answer: D


NEW QUESTION # 55
Which of the following commands extracts the contents of the compressed archive file1.tar.gz?

  • A. ztar file1.tar.gz
  • B. tar -czf file1.tar.gz
  • C. detar file1.tar.gz
  • D. tar --extract file1.tar.gz
  • E. tar -xzf file1.tar.gz

Answer: E

Explanation:
Explanation
The correct command to extract the contents of the compressed archive file1.tar.gz is tar -xzf file1.tar.gz. This command uses the following options:
* -x means extract files from an archive.
* -z means filter the archive through gzip, which is a compression program that reduces the size of files.
* -f means use the following archive file name, which is file1.tar.gz in this case.
The other commands are incorrect for the following reasons:
* tar -czf file1.tar.gz creates a compressed archive file1.tar.gz from the files specified after the command, not extract it.
* ztar file1.tar.gz is not a valid command, as ztar is not a standard program or option for tar.
* tar --extract file1.tar.gz is missing the -z option to handle the gzip compression, and also the -f option to specify the file name.
* detar file1.tar.gz is not a valid command, as detar is not a standard program or option for tar.
References:
* Linux Essentials - Topic 106: The Linux Operating System, section 106.2 Use single shell commands and one line command sequences to perform basic tasks on the command line.
* LPI Linux Essentials Study Guide: Exam 010 v1.6, 3rd Edition, Chapter 5: Working with Files and Directories, section Compressing and Archiving Files.


NEW QUESTION # 56
Which of the following keys can be pressed to exit less?

  • A. e
  • B. 0
  • C. !
  • D. x
  • E. q

Answer: E


NEW QUESTION # 57
What is defined by a Free Software license?

  • A. Limits on the purposes for which the licensed software may be used.
  • B. A complete list of libraries required to compile the licensed software.
  • C. The programming languages which may be used to extend the licensed program.
  • D. Conditions for modifying and distributing the licensed software.
  • E. Details of the technical documentation each contributor has to provide.

Answer: D

Explanation:
A free software license is a notice that grants the recipient of a piece of software extensive rights to modify and redistribute that software. These actions are usually prohibited by copyright law, but the rights-holder (usually the author) of a piece of software can remove these restrictions by accompanying the software with a software license which grants the recipient these rights. Software using such a license is free software (or free and open-source software) as conferred by the copyright holder. Free software licenses grant users the freedom to use it for any purpose, study and change the source code and copy and redistribute the software with or without modifications. Free software must come with source code or provide access to it, while the freedom to redistribute includes the right to give away copies gratis as well as sell copies1 Reference: 1: Free-software license - Wikipedia


NEW QUESTION # 58
FILL BLANK
What keyword is used in a shell script to begin a loop? (Specify one keyword only, without any additional information.)

Answer:

Explanation:
for Explanation The keyword for is used in a shell script to begin a loop that iterates over a list of items or a range of numbers.
The syntax of the for loop is as follows:
for <var> in <list> do <commands> done
The variable <var> is assigned to each element of the <list> in turn, and the <commands> are executed for each iteration. The <list> can be a sequence of words, numbers, filenames, or other values. If the <list> is omitted, the for loop will iterate over the positional parameters ($1, $2, ...). The do and done keywords mark the beginning and the end of the loop body, respectively. The for loop is one of the three types of loops in shell scripting, along with the while and until loops. References: 1: Looping Statements |Shell Script - GeeksforGeeks 1 2: unix - Shell script "for" loop syntax - Stack Overflow 2 3: For Loop Shell Scripting - javatpoint 3


NEW QUESTION # 59
What is a Linux distribution?

  • A. A bundling of the Linux kernel, system utilities and other software.
  • B. A set of changes to Linux which enable Linux to run on another processor architecture.
  • C. An operating system based on Linux but incompatible to the regular Linux kernel.
  • D. The Linux file system as seen from the root account after mounting all file systems.
  • E. The set of rules which governs the distributionof Linux kernel source code.

Answer: A


NEW QUESTION # 60
Which of the following devices represents a hard disk partition?

  • A. /dev/ttyS0
  • B. /dev/part0
  • C. /dev/sda2
  • D. /dev/sata0
  • E. /dev/sda/p2

Answer: C

Explanation:
Section: (none)
The correct device name that represents a hard disk partition is /dev/sda2. This device name follows the Linux convention for naming hard disk devices and partitions. According to this convention123:
The first part of the device name indicates the type of the device. For example, /dev/hd* for IDE drives, /dev/sd* for SCSI, SATA, USB, or eSATA drives, /dev/nvme* for NVMe drives, etc.
The second part of the device name indicates the order of the device as detected by the system. For example, /dev/sda is the first serial drive, /dev/sdb is the second serial drive, and so on.
The third part of the device name indicates the number of the partition on the device. For example, /dev/sda1 is the first partition on the first serial drive, /dev/sda2 is the second partition on the first serial drive, and so on.
Therefore, /dev/sda2 means the second partition on the first serial drive, which is a valid hard disk partition. The other options are not valid hard disk partitions, because they do not follow the Linux convention. For example:
/dev/ttyS0 is a serial port device, not a hard disk device4.
/dev/sata0 is not a valid device name, because it does not specify the partition number. It should be something like /dev/sata0p1 or /dev/sata0p2, etc.
/dev/part0 is not a valid device name, because it does not specify the device type or the partition number. It should be something like /dev/sdXp0 or /dev/hdXp0, etc.
/dev/sda/p2 is not a valid device name, because it uses a slash (/) instead of a number to indicate the partition. It should be something like /dev/sda2 or /dev/sda3, etc.


NEW QUESTION # 61
......

Pass Lpi 010-160 Exam Info and Free Practice Test: https://www.test4engine.com/010-160_exam-latest-braindumps.html

Lpi 010-160 Real Exam Questions and Answers FREE: https://drive.google.com/open?id=1rlzlkvugfuREZB_sNPXOG4kP_5xZtaEh