cert
cert-1
cert-2

Pass LPI 010-160 Exam in First Attempt Guaranteed!

Get 100% Latest Exam Questions, Accurate & Verified Answers to Pass the Actual Exam!
30 Days Free Updates, Instant Download!

cert-5
cert-6
010-160 Exam - Verified By Experts
010-160 Premium Bundle
$29.98

010-160 Premium Bundle

$79.99
$109.97
  • Premium File 80 Questions & Answers. Last update: Nov 10, 2026
  • Training Course 78 Video Lectures
  • Study Guide 364 Pages
 
$109.97
$79.99
accept 35 downloads in last 7 days
block-screenshots
Purchase LPI 010-160 Exam Training Products Individually
LPI 010-160 Premium File
Premium File 80 Q&A
$76.99$69.99
LPI 010-160 Video Training Course
Training Course 78 Lectures
$21.99 $19.99
LPI 010-160 PDF Study Guide
Study Guide 364 Pages
$21.99 $19.99
LPI 010-160 Practice Test 89

Question 880

A parent shell sets `API_MODE=test` and wants a child process to receive it. Select TWO statements that together form an appropriate implementation and validation plan.

  1. Run `unset API_MODE` to publish the variable.
  2. Run `export API_MODE=test` or export an existing variable before launching the child.
  3. A child process displays the inherited value from its environment.
  4. Assume every local variable is automatically exported.
  5. Store the variable only in a terminal's title bar.

Explanation

Correct Answers

B:

Run `export API_MODE=test` or export an existing variable before launching the child. This is the actual implementation for Exported environment variables.

C:

A child process displays the inherited value from its environment. This provides direct evidence of the intended Exported environment variables behavior.

Incorrect Answers

A:

Run `unset API_MODE` to publish the variable. This does not contribute a sound implementation or validation step for Exported environment variables. A nonexported shell-only variable is not automatically inherited by child programs.

D:

Assume every local variable is automatically exported. This does not contribute a sound implementation or validation step for Exported environment variables. A nonexported shell-only variable is not automatically inherited by child programs.

E:

Store the variable only in a terminal's title bar. This does not contribute a sound implementation or validation step for Exported environment variables. A nonexported shell-only variable is not automatically inherited by child programs.

Question 881

A student wants to count lines that contain `failed` without creating a temporary file. Select THREE statements that together form an appropriate implementation and validation plan.

  1. `|` passes one command's standard output to the next command's standard input.
  2. The count reflects only the lines sent from grep through the pipe.
  3. Run a pipeline such as `grep 'failed' log | wc -l`.
  4. Put two commands on separate lines and assume their output is automatically linked.
  5. Use `&&` expecting filtered text to become standard input.
  6. Use `>` between commands to execute a pipe.

Explanation

Correct Answers

A:

`|` passes one command's standard output to the next command's standard input. This is the governing technical reason for the chosen solution.

B:

The count reflects only the lines sent from grep through the pipe. This provides direct evidence of the intended Pipes connecting commands behavior.

C:

Run a pipeline such as `grep 'failed' log | wc -l`. This is the actual implementation for Pipes connecting commands.

Incorrect Answers

D:

Put two commands on separate lines and assume their output is automatically linked. This does not contribute a sound implementation or validation step for Pipes connecting commands. Running commands separately without connecting streams does not build the same pipeline.

E:

Use `&&` expecting filtered text to become standard input. This does not contribute a sound implementation or validation step for Pipes connecting commands. Running commands separately without connecting streams does not build the same pipeline.

F:

Use `>` between commands to execute a pipe. This does not contribute a sound implementation or validation step for Pipes connecting commands. Running commands separately without connecting streams does not build the same pipeline.

Question 882

A lab needs a temporary local name-to-address mapping without public DNS changes. Select TWO statements that together form an appropriate implementation and validation plan.

  1. Add an appropriate entry to `/etc/hosts` and verify local lookup precedence.
  2. Edit `/etc/passwd` to create DNS records.
  3. Assume a hosts-file line changes public DNS worldwide.
  4. The local host resolves the specified name to the configured IP.
  5. Use an S3 object tag as a system resolver entry.

Explanation

Correct Answers

A:

Add an appropriate entry to `/etc/hosts` and verify local lookup precedence. This is the actual implementation for /etc/hosts local name entries.

D:

The local host resolves the specified name to the configured IP. This provides direct evidence of the intended /etc/hosts local name entries behavior.

Incorrect Answers

B:

Edit `/etc/passwd` to create DNS records. This does not contribute a sound implementation or validation step for /etc/hosts local name entries. A local hosts entry does not update global public DNS for other computers.

C:

Assume a hosts-file line changes public DNS worldwide. This does not contribute a sound implementation or validation step for /etc/hosts local name entries. A local hosts entry does not update global public DNS for other computers.

E:

Use an S3 object tag as a system resolver entry. This does not contribute a sound implementation or validation step for /etc/hosts local name entries. A local hosts entry does not update global public DNS for other computers.

Question 883

A trainee working in `/home/lee/projects` needs to move to `/home/lee`. Select TWO statements that together form an appropriate implementation and validation plan.

  1. Use `cd .` expecting to move up.
  2. Enter `cd ~` and assume home is always the current parent's path.
  3. Run `cd /` expecting only one level of ascent.
  4. `pwd` after the change displays the parent directory.
  5. Run `cd ..` to enter the parent directory.

Explanation

Correct Answers

D:

`pwd` after the change displays the parent directory. This provides direct evidence of the intended cd parent directory behavior.

E:

Run `cd .` to enter the parent directory. This is the actual implementation for cd parent directory.

Incorrect Answers

A:

Use `cd .` expecting to move up. This does not contribute a sound implementation or validation step for cd parent directory. Using `.` instead would refer to the current directory, not the parent.

B:

Enter `cd ~` and assume home is always the current parent's path. This does not contribute a sound implementation or validation step for cd parent directory. Using `.` instead would refer to the current directory, not the parent.

C:

Run `cd /` expecting only one level of ascent. This does not contribute a sound implementation or validation step for cd parent directory. Using `.` instead would refer to the current directory, not the parent.

Question 884

An administrator wants to see people currently logged into the host. Select TWO statements that together form an appropriate implementation and validation plan.

  1. Use `free` to identify active users.
  2. Use `groupadd` to list interactive logins.
  3. Run `last` and assume it shows only current sessions.
  4. The output distinguishes current users from previously recorded login sessions.
  5. Use `who` or `w` for current sessions and `last` for login history where recorded.

Explanation

Correct Answers

D:

The output distinguishes current users from previously recorded login sessions. This provides direct evidence of the intended who w and last login activity behavior.

E:

Use `who` or `w` for current sessions and `last` for login history where recorded. This is the actual implementation for who w and last login activity.

Incorrect Answers

A:

Use `free` to identify active users. This does not contribute a sound implementation or validation step for who w and last login activity. Treating a login-history command as a list of all installed users gives incorrect scope.

B:

Use `groupadd` to list interactive logins. This does not contribute a sound implementation or validation step for who w and last login activity. Treating a login-history command as a list of all installed users gives incorrect scope.

C:

Run `last` and assume it shows only current sessions. This does not contribute a sound implementation or validation step for who w and last login activity. Treating a login-history command as a list of all installed users gives incorrect scope.

Question 885

A desktop needs safe repeatable application updates with dependencies resolved. Select TWO statements that together form an appropriate implementation and validation plan.

  1. Install source archives without checking any origin or dependency.
  2. Use a word processor as the system package database.
  3. Installed packages and dependency versions are tracked by the repository tools.
  4. Use the distribution's package manager and signed repositories to resolve and update packages.
  5. Rename a downloaded .tar file into a signed repository.

Explanation

Correct Answers

C:

Installed packages and dependency versions are tracked by the repository tools. This provides direct evidence of the intended Native distribution package repositories behavior.

D:

Use the distribution's package manager and signed repositories to resolve and update packages. This is the actual implementation for Native distribution package repositories.

Incorrect Answers

A:

Install source archives without checking any origin or dependency. This does not contribute a sound implementation or validation step for Native distribution package repositories. Manually copying unknown executables does not manage dependencies or security updates.

B:

Use a word processor as the system package database. This does not contribute a sound implementation or validation step for Native distribution package repositories. Manually copying unknown executables does not manage dependencies or security updates.

E:

Rename a downloaded .tar file into a signed repository. This does not contribute a sound implementation or validation step for Native distribution package repositories. Manually copying unknown executables does not manage dependencies or security updates.

Question 886

A monitoring script needs the last ten lines of an activity log. Select TWO statements that together form an appropriate implementation and validation plan.

  1. Only the requested prefix or suffix lines appear.
  2. Use `sort` to read only the newest appended lines.
  3. Use `cut` to choose file start and end by timestamps.
  4. Use `head` to guarantee the final log lines.
  5. Use `tail -n 10 log` for the end or `head -n 5 file` for the beginning.

Explanation

Correct Answers

A:

Only the requested prefix or suffix lines appear. This provides direct evidence of the intended head and tail line selection behavior.

E:

Use `tail -n 10 log` for the end or `head -n 5 file` for the beginning. This is the actual implementation for head and tail line selection.

Incorrect Answers

B:

Use `sort` to read only the newest appended lines. This does not contribute a sound implementation or validation step for head and tail line selection. Reversing head and tail returns the wrong part of a file.

C:

Use `cut` to choose file start and end by timestamps. This does not contribute a sound implementation or validation step for head and tail line selection. Reversing head and tail returns the wrong part of a file.

D:

Use `head` to guarantee the final log lines. This does not contribute a sound implementation or validation step for head and tail line selection. Reversing head and tail returns the wrong part of a file.

Question 887

A report generator must replace the old contents of an output file. Select TWO statements that together form an appropriate implementation and validation plan.

  1. The target file is replaced or extended according to the chosen operator.
  2. Use `>` to overwrite stdout to a file and `>>` to append stdout to the file.
  3. Use `|` to create a persistent output file without a receiving command.
  4. Use `>` when the requirement is to keep all earlier lines.
  5. Assume `>>` always truncates the file first.

Explanation

Correct Answers

A:

The target file is replaced or extended according to the chosen operator. This provides direct evidence of the intended Redirecting output and append behavior.

B:

Use `>` to overwrite stdout to a file and `>>` to append stdout to the file. This is the actual implementation for Redirecting output and append.

Incorrect Answers

C:

Use `|` to create a persistent output file without a receiving command. This does not contribute a sound implementation or validation step for Redirecting output and append. The wrong operator can discard previous output or accumulate stale content.

D:

Use `>` when the requirement is to keep all earlier lines. This does not contribute a sound implementation or validation step for Redirecting output and append. The wrong operator can discard previous output or accumulate stale content.

E:

Assume `>>` always truncates the file first. This does not contribute a sound implementation or validation step for Redirecting output and append. The wrong operator can discard previous output or accumulate stale content.

Question 888

A script should process every `.log` file in its current directory. Select THREE statements that together form an appropriate implementation and validation plan.

  1. Each matched filename is processed as its own argument.
  2. Use `echo "$file"` outside the loop expecting all files.
  3. A pathname glob can supply the loop's items while quoted variable expansion preserves each filename.
  4. Write `for file in '*.log'` expecting shell expansion of the quoted pattern.
  5. Run `rm *.log` instead of iterating when processing is required.
  6. Use `for file in *.log; do ... "$file" ...; done` with quoted expansion.

Explanation

Correct Answers

A:

Each matched filename is processed as its own argument. This provides direct evidence of the intended Loop over matching filenames behavior.

C:

A pathname glob can supply the loop's items while quoted variable expansion preserves each filename. This is the governing technical reason for the chosen solution.

F:

Use `for file in *.log; do . "$file" .; done` with quoted expansion. This is the actual implementation for Loop over matching filenames.

Incorrect Answers

B:

Use `echo "$file"` outside the loop expecting all files. This does not contribute a sound implementation or validation step for Loop over matching filenames. Using a quoted literal glob as the loop source prevents normal pathname expansion.

D:

Write `for file in '*.log'` expecting shell expansion of the quoted pattern. This does not contribute a sound implementation or validation step for Loop over matching filenames. Using a quoted literal glob as the loop source prevents normal pathname expansion.

E:

Run `rm *.log` instead of iterating when processing is required. This does not contribute a sound implementation or validation step for Loop over matching filenames. Using a quoted literal glob as the loop source prevents normal pathname expansion.

Question 889

A VM reaches its local subnet but cannot access destinations outside it. Select TWO statements that together form an appropriate implementation and validation plan.

  1. Assume a DNS server is automatically the router.
  2. Modify `/etc/hosts` expecting it to add an IP default route.
  3. Run `ip route show` and inspect the default route.
  4. Use `ping` to print complete route configuration.
  5. The routing table identifies the gateway or default route as applicable.

Explanation

Correct Answers

C:

Run `ip route show` and inspect the default route. This is the actual implementation for ip route show default gateway.

E:

The routing table identifies the gateway or default route as applicable. This provides direct evidence of the intended ip route show default gateway behavior.

Incorrect Answers

A:

Assume a DNS server is automatically the router. This does not contribute a sound implementation or validation step for ip route show default gateway. Missing a default route can prevent off-subnet connectivity.

B:

Modify `/etc/hosts` expecting it to add an IP default route. This does not contribute a sound implementation or validation step for ip route show default gateway. Missing a default route can prevent off-subnet connectivity.

D:

Use `ping` to print complete route configuration. This does not contribute a sound implementation or validation step for ip route show default gateway. Missing a default route can prevent off-subnet connectivity.

Question 890

An automation runner checks a script's result and should stop after a fatal error. Select TWO statements that together form an appropriate implementation and validation plan.

  1. The caller can distinguish success and failure through the process exit status.
  2. Print an error message but always force zero status.
  3. Use `exit 0` for successful completion and a nonzero exit code for a failure.
  4. Use `exit 1` to indicate unequivocal success.
  5. Treat output color as the only machine-readable success signal.

Explanation

Correct Answers

A:

The caller can distinguish success and failure through the process exit status. This provides direct evidence of the intended Exit code on script completion behavior.

C:

Use `exit 0` for successful completion and a nonzero exit code for a failure. This is the actual implementation for Exit code on script completion.

Incorrect Answers

B:

Print an error message but always force zero status. This does not contribute a sound implementation or validation step for Exit code on script completion. Returning success after a failed critical command can mislead later automation.

D:

Use `exit 1` to indicate unequivocal success. This does not contribute a sound implementation or validation step for Exit code on script completion. Returning success after a failed critical command can mislead later automation.

E:

Treat output color as the only machine-readable success signal. This does not contribute a sound implementation or validation step for Exit code on script completion. Returning success after a failed critical command can mislead later automation.

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