Pass LPI 010-160 Exam in First Attempt Easily
Real LPI 010-160 Exam Questions, Accurate & Verified Answers As Experienced in the Actual Test!

Verified by experts
3 products

You save $69.98

010-160 Premium Bundle

  • Premium File 80 Questions & Answers
  • Last Update: Nov 8, 2026
  • Training Course 78 Lectures
  • Study Guide 364 Pages
$79.99 $149.97

Purchase Individually

  • Premium File

    80 Questions & Answers
    Last Update: Nov 8, 2026

    $76.99
    $69.99
  • Training Course

    78 Lectures

    $43.99
    $39.99
  • Study Guide

    364 Pages

    $43.99
    $39.99

Linux Essentials Certificate Exam, version 1.6 010-160 Practice Test 3

Question 20

A learner performs this action: Use echo "$item" inside the loop body. For the situation (a novice writes a loop variable name in a script and needs to print its value instead of the literal variable name), which observation would confirm success?

  1. The body runs once per listed directory and prints each name.
  2. The printed numeric value reflects that command's exit status, with zero conventionally indicating success.
  3. Each received argument reaches the command as the same separate word.
  4. Each iteration prints the value assigned to item.

Explanation

Correct Answer

D:

Each iteration prints the value assigned to item. That specific observation verifies the intended change (Use echo "$item" inside the loop body.) for this situation. Bash performs parameter expansion inside double quotes but not inside single quotes.

Incorrect Answers

A:

The body runs once per listed directory and prints each name. That observation would test whether A learner needs to print the names of three project directories using a loop rather than copying an echo command three times. It would not establish the required outcome here, which is each iteration prints the value assigned to item.

B:

The printed numeric value reflects that command's exit status, with zero conventionally indicating success. That observation would test whether A script operator wants to print the exit status of a command immediately after it runs, before any later command alters the last status. It would not establish the required outcome here, which is each iteration prints the value assigned to item.

C:

Each received argument reaches the command as the same separate word. That observation would test whether A wrapper script must forward every original positional argument to another command while preserving spaces within individual arguments. It would not establish the required outcome here, which is each iteration prints the value assigned to item.

Question 21

An analyst needs to count the number of newline-delimited records in a local text file. Which command, configuration choice, or action best addresses this situation?

  1. Run wc -l records.txt.
  2. Pipe the matching lines from grep 'FAILED' file.txt into wc -l.
  3. Run sort -u names.txt.
  4. Run cut -d ',' -f 3 data.csv.

Explanation

Correct Answer

A:

Run wc -l records.txt. It addresses the stated requirement: An analyst needs to count the number of newline-delimited records in a local text file. The underlying reason is that wc -l counts newline characters rather than file bytes or words.

Incorrect Answers

B:

Pipe the matching lines from grep 'FAILED' file.txt into wc -l. That action is relevant when a learner wants to count only lines containing FAILED in a text file using two simple commands. For the current case, the fitting action is run wc -l records.txt.

C:

Run sort -u names.txt. That action is relevant when a student has a text file containing repeated names and wants a lexically sorted unique list. For the current case, the fitting action is run wc -l records.txt.

D:

Run cut -d ',' -f 3 data.csv. That action is relevant when a log uses comma-separated fields and a student needs only its third simple field from each line, with no embedded commas or quoting. For the current case, the fitting action is run wc -l records.txt.

Question 22

A desktop user must manage files on a Linux server that has no graphical desktop installed. Which command, configuration choice, or action best addresses this situation?

  1. Use distinct strong passwords and lock or log out of the session when leaving the computer.
  2. Open a terminal or remote shell session and use command-line tools for the required work.
  3. Review the browser's privacy settings and restrict third-party tracking cookies where supported.
  4. Review user access and configure least-privilege sharing for the hosted files.

Explanation

Correct Answer

B:

Open a terminal or remote shell session and use command-line tools for the required work. It addresses the stated requirement: A desktop user must manage files on a Linux server that has no graphical desktop installed. The underlying reason is that a terminal provides a text interface to a shell independently of a graphical desktop.

Incorrect Answers

A:

Use distinct strong passwords and lock or log out of the session when leaving the computer. That action is relevant when a trainee wants to protect personal accounts when sharing a Linux workstation with other students. For the current case, the fitting action is open a terminal or remote shell session and use command-line tools for the required work.

C:

Review the browser's privacy settings and restrict third-party tracking cookies where supported. That action is relevant when a web user wants to reduce cross-site tracking when researching Linux documentation in a desktop browser. For the current case, the fitting action is open a terminal or remote shell session and use command-line tools for the required work.

D:

Review user access and configure least-privilege sharing for the hosted files. That action is relevant when a team stores a collaborative document in a hosted cloud service and assumes the service eliminates the need to manage its own sharing permissions. For the current case, the fitting action is open a terminal or remote shell session and use command-line tools for the required work.

Question 23

Consider this unresolved requirement: A technician needs file ownership, permissions and modification details instead of filenames alone. What is its most direct operational or security risk?

  1. A standard listing may hide configuration files and create the mistaken impression that they are missing.
  2. A nonrecursive listing can omit content stored beneath subdirectories.
  3. Relying on a plain name listing may hide permission problems.
  4. Using a relative path without the correct starting location can navigate to an unintended directory.

Explanation

Correct Answer

C:

Relying on a plain name listing may hide permission problems. This is the most direct consequence of leaving the described condition unresolved. The long listing option -l presents additional file metadata.

Incorrect Answers

A:

A standard listing may hide configuration files and create the mistaken impression that they are missing. That risk arises when a student cannot see a file named .config-note in an ordinary ls listing of a directory. The current unresolved condition instead creates the risk that relying on a plain name listing may hide permission problems.

B:

A nonrecursive listing can omit content stored beneath subdirectories. That risk arises when a learner needs to list a directory tree including entries inside nested subdirectories. The current unresolved condition instead creates the risk that relying on a plain name listing may hide permission problems.

D:

Using a relative path without the correct starting location can navigate to an unintended directory. That risk arises when a student is in /home/alex/docs and needs to move to /etc regardless of the current location. The current unresolved condition instead creates the risk that relying on a plain name listing may hide permission problems.

Question 24

A script operator wants to print the exit status of a command immediately after it runs, before any later command alters the last status. The chosen response is: Run echo $? immediately after the command whose status must be inspected. Which Linux principle explains why that response works?

  1. A shebang requests the interpreter used when the operating system directly executes a script.
  2. Bash performs parameter expansion inside double quotes but not inside single quotes.
  3. Within double quotes, "$@" expands to each positional parameter as its own shell word.
  4. Bash sets the special parameter $? to the exit status of the most recently completed foreground pipeline.

Explanation

Correct Answer

D:

Bash sets the special parameter $? to the exit status of the most recently completed foreground pipeline. That mechanism connects the chosen action (Run echo $? immediately after the command whose status must be inspected) to the stated need. The expected success evidence is: The printed numeric value reflects that command's exit status, with zero conventionally indicating success.

Incorrect Answers

A:

A shebang requests the interpreter used when the operating system directly executes a script. That principle applies when a simple Bash script is opened by an interpreter but its first line must explicitly identify Bash as the intended interpreter. Here the decisive reason is that bash sets the special parameter $? to the exit status of the most recently completed foreground pipeline.

B:

Bash performs parameter expansion inside double quotes but not inside single quotes. That principle applies when a novice writes a loop variable name in a script and needs to print its value instead of the literal variable name. Here the decisive reason is that bash sets the special parameter $? to the exit status of the most recently completed foreground pipeline.

C:

Within double quotes, "$@" expands to each positional parameter as its own shell word. That principle applies when a wrapper script must forward every original positional argument to another command while preserving spaces within individual arguments. Here the decisive reason is that bash sets the special parameter $? to the exit status of the most recently completed foreground pipeline.

Question 25

A workstation resolves an internal hostname incorrectly and the operator needs to see local DNS resolver configuration. Which command, configuration choice, or action best addresses this situation?

  1. Inspect the system's active resolver settings, including /etc/resolv.conf where applicable.
  2. Add a controlled hostname-to-address mapping to /etc/hosts.
  3. Run ip addr show to inspect interface address assignments.
  4. Run ip route show and inspect the default route.

Explanation

Correct Answer

A:

Inspect the system's active resolver settings, including /etc/resolv.conf where applicable. It addresses the stated requirement: A workstation resolves an internal hostname incorrectly and the operator needs to see local DNS resolver configuration. The underlying reason is that dNS client resolver configuration tells software where to direct name-resolution requests.

Incorrect Answers

B:

Add a controlled hostname-to-address mapping to /etc/hosts. That action is relevant when a test host must override DNS for one temporary lab hostname without changing authoritative DNS servers. For the current case, the fitting action is inspect the system's active resolver settings, including /etc/resolv.conf where applicable.

C:

Run ip addr show to inspect interface address assignments. That action is relevant when a user needs to list network interface addresses on a modern Linux host. For the current case, the fitting action is inspect the system's active resolver settings, including /etc/resolv.conf where applicable.

D:

Run ip route show and inspect the default route. That action is relevant when a Linux laptop can reach local devices but cannot connect to off-subnet networks and the user suspects its gateway. For the current case, the fitting action is inspect the system's active resolver settings, including /etc/resolv.conf where applicable.

Question 26

A student must copy an entire directory named reports into an archive directory while preserving the original directory. The chosen response is: Run cp -r reports archive/ after checking the destination. Which Linux principle explains why that response works?

  1. mv changes a file's directory entry or moves it to another path.
  2. cp -r recursively copies directory entries.
  3. mkdir -p creates required parent directories if they do not yet exist.
  4. rm -i asks for interactive confirmation before removing an entry.

Explanation

Correct Answer

B:

cp -r recursively copies directory entries. That mechanism connects the chosen action (Run cp -r reports archive/ after checking the destination) to the stated need. The expected success evidence is: The destination contains the copied reports tree and the source remains.

Incorrect Answers

A:

mv changes a file's directory entry or moves it to another path. That principle applies when a user wants to rename notes-old.txt to notes-new.txt within the same directory. Here the decisive reason is that cp -r recursively copies directory entries.

C:

mkdir -p creates required parent directories if they do not yet exist. That principle applies when a learner must create /home/alex/work/week1/reports although intermediate work folders do not yet exist. Here the decisive reason is that cp -r recursively copies directory entries.

D:

rm -i asks for interactive confirmation before removing an entry. That principle applies when an operator must remove a particular file but wants interactive confirmation before deletion. Here the decisive reason is that cp -r recursively copies directory entries.

Question 27

A shell user wants the literal characters $HOME printed rather than an expansion of the current home directory. Which command, configuration choice, or action best addresses this situation?

  1. Use echo "$PROJECT" with the variable expansion enclosed in double quotes.
  2. Use echo followed by the intended literal or expanded argument, with quoting matched to the desired output.
  3. Use single quotes around the text, as in echo '$HOME'.
  4. Add the executable's directory to PATH or invoke the executable using an explicit path.

Explanation

Correct Answer

C:

Use single quotes around the text, as in echo '$HOME'. It addresses the stated requirement: A shell user wants the literal characters $HOME printed rather than an expansion of the current home directory. The underlying reason is that in Bash, single quotes prevent parameter expansion inside the quoted string.

Incorrect Answers

A:

Use echo "$PROJECT" with the variable expansion enclosed in double quotes. That action is relevant when a shell variable named PROJECT contains two words and a learner needs to print its value as one shell argument without word splitting. For the current case, the fitting action is use single quotes around the text, as in echo '$HOME'.

B:

Use echo followed by the intended literal or expanded argument, with quoting matched to the desired output. That action is relevant when a learner tries to display a value with echo but accidentally places a command name in a shell redirection expression. For the current case, the fitting action is use single quotes around the text, as in echo '$HOME'.

D:

Add the executable's directory to PATH or invoke the executable using an explicit path. That action is relevant when a user types a command name and the shell cannot find it even though an executable exists in an unlisted directory. For the current case, the fitting action is use single quotes around the text, as in echo '$HOME'.

Question 28

A learner performs this action: Set an appropriate umask before files are created and verify the default mode. For the situation (a team wants newly created files to avoid world-write access without changing each file manually afterward), which observation would confirm success?

  1. The mode shows owner rw, group r and other no permissions.
  2. The intended user can traverse the directory and open permitted entries.
  3. The owner execute bit is present while unrelated execute permissions remain unchanged.
  4. New files omit the unwanted world-write permission.

Explanation

Correct Answer

D:

New files omit the unwanted world-write permission. That specific observation verifies the intended change (Set an appropriate umask before files are created and verify the default mode.) for this situation. umask removes specified permission bits from the creation mode used for new filesystem entries.

Incorrect Answers

A:

The mode shows owner rw, group r and other no permissions. That observation would test whether A file containing team notes should allow the owner to read and write, the file's group to read, and others no access. It would not establish the required outcome here, which is new files omit the unwanted world-write permission.

B:

The intended user can traverse the directory and open permitted entries. That observation would test whether A user has write permission on files inside a directory but cannot enter the directory to open them by path. It would not establish the required outcome here, which is new files omit the unwanted world-write permission.

C:

The owner execute bit is present while unrelated execute permissions remain unchanged. That observation would test whether A script file belongs to a user who must execute it but should not grant execute permission to everyone. It would not establish the required outcome here, which is new files omit the unwanted world-write permission.

Question 29

A program writes many lines and a user needs to inspect only the final ten lines of its output log. Which command, configuration choice, or action best addresses this situation?

  1. Run tail -n 10 logfile.
  2. Run cut -d ',' -f 3 data.csv.
  3. Use grep -n 'listen' configfile to prefix matching lines with line numbers.
  4. Use grep -i 'error' logfile to search case-insensitively.

Explanation

Correct Answer

A:

Run tail -n 10 logfile. It addresses the stated requirement: A program writes many lines and a user needs to inspect only the final ten lines of its output log. The underlying reason is that tail selects the end of an input stream or file.

Incorrect Answers

B:

Run cut -d ',' -f 3 data.csv. That action is relevant when a log uses comma-separated fields and a student needs only its third simple field from each line, with no embedded commas or quoting. For the current case, the fitting action is run tail -n 10 logfile.

C:

Use grep -n 'listen' configfile to prefix matching lines with line numbers. That action is relevant when a trainee needs the line numbers of configuration lines that contain the text listen. For the current case, the fitting action is run tail -n 10 logfile.

D:

Use grep -i 'error' logfile to search case-insensitively. That action is relevant when a technician must find case-insensitive occurrences of ERROR in a log, even when messages contain error or Error. For the current case, the fitting action is run tail -n 10 logfile.

Question 30

Consider this unresolved requirement: A script reads paths from standard input and must preserve literal backslashes instead of treating them as escapes. What is its most direct operational or security risk?

  1. Depending on the invoking shell can make Bash-specific syntax fail under another interpreter.
  2. Using read without -r can consume backslashes used in legitimate filenames.
  3. Using unquoted $* may split or expand argument content unexpectedly.
  4. Manual repetition can introduce inconsistent commands when the list changes.

Explanation

Correct Answer

B:

Using read without -r can consume backslashes used in legitimate filenames. This is the most direct consequence of leaving the described condition unresolved. Bash read -r disables its normal backslash escape processing.

Incorrect Answers

A:

Depending on the invoking shell can make Bash-specific syntax fail under another interpreter. That risk arises when a simple Bash script is opened by an interpreter but its first line must explicitly identify Bash as the intended interpreter. The current unresolved condition instead creates the risk that using read without -r can consume backslashes used in legitimate filenames.

C:

Using unquoted $* may split or expand argument content unexpectedly. That risk arises when a wrapper script must forward every original positional argument to another command while preserving spaces within individual arguments. The current unresolved condition instead creates the risk that using read without -r can consume backslashes used in legitimate filenames.

D:

Manual repetition can introduce inconsistent commands when the list changes. That risk arises when a learner needs to print the names of three project directories using a loop rather than copying an echo command three times. The current unresolved condition instead creates the risk that using read without -r can consume backslashes used in legitimate filenames.

Linux Essentials Certificate Exam, version 1.6 (010-160) Practice Tests

Purchase Individually

  • Premium File

    80 Questions & Answers
    Last Update: Nov 8, 2026

    $76.99
    $69.99
  • Training Course

    78 Lectures

    $43.99
    $39.99
  • Study Guide

    364 Pages

    $43.99
    $39.99

SPECIAL OFFER: GET 10% OFF
This is ONE TIME OFFER

You save
10%

Enter Your Email Address to Receive Your 10% Off Discount Code

SPECIAL OFFER: GET 10% OFF

You save
10%

Use Discount Code:

A confirmation link was sent to your e-mail.

Please check your mailbox for a message from support@examlabs.com and follow the directions.

Download Free Demo of VCE Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.

Simply submit your email address below to get started with our interactive software demo of your free trial.

  • Realistic exam simulation and exam editor with preview functions
  • Whole exam in a single file with several different question types
  • Customizable exam-taking mode & detailed score reports