LPI 010-160 Practice Test 3
Question 20
A Linux administrator needs to find system-wide text configuration files. Which action BEST accomplishes the stated Linux task?
- Inspect `/etc` and the service's documented configuration path.
- Search only `/tmp` for persistent system configuration.
- Assume `/proc/cpuinfo` is an editable service config.
- Store all host configuration in a browser cache.
Explanation
Correct Answer
A:Inspect `/etc` and the service's documented configuration path. `/etc` commonly stores host-specific system configuration, not arbitrary user documents. To confirm completion, the selected service configuration file is present under the expected directory.
Incorrect Answers
B:Search only `/tmp` for persistent system configuration. This changes the workflow in the wrong way for /etc configuration files. Editing data in `/dev` does not replace system configuration files. For this task the appropriate operation is to inspect `/etc` and the service's documented configuration path.
C:Assume `/proc/cpuinfo` is an editable service config. It does not meet the requirement in this case: A Linux administrator needs to find system-wide text configuration files. `/etc` commonly stores host-specific system configuration, not arbitrary user documents.
D:Store all host configuration in a browser cache. It would not produce the expected result: The selected service configuration file is present under the expected directory. The named operation concerns /etc configuration files.
Question 21
A user can read a file but cannot delete it from a shared directory. Which action BEST accomplishes the stated Linux task?
- Rename the filename extension to bypass directory policy.
- Modify the file contents to change its parent's execute bit.
- Check write plus execute permissions on the parent directory and any sticky-bit restrictions.
- Add only file read permission expecting deletion rights.
Explanation
Correct Answer
C:Check write plus execute permissions on the parent directory and any sticky-bit restrictions. Unlinking a file requires permissions on its directory rather than necessarily on the file's own write bit. To confirm completion, deletion is allowed or denied according to directory-level rights and protection.
Incorrect Answers
A:Rename the filename extension to bypass directory policy. It does not meet the requirement in this case: A user can read a file but cannot delete it from a shared directory. Unlinking a file requires permissions on its directory rather than necessarily on the file's own write bit.
B:Modify the file contents to change its parent's execute bit. It would not produce the expected result: Deletion is allowed or denied according to directory-level rights and protection. The named operation concerns Directory write and delete rights.
D:This changes the workflow in the wrong way for Directory write and delete rights.
Question 22
A script must create `reports/2026/nov` under the home directory when parent folders are absent. Which action BEST accomplishes the stated Linux task?
- Run `touch reports/2026/nov` as a directory constructor.
- Run `mkdir -p reports/2026/nov` to create missing parents.
- Assume `mkdir` without options always builds every missing parent.
- Use `rmdir -p` to create missing ancestors.
Explanation
Correct Answer
B:Run `mkdir -p reports/2026/nov` to create missing parents. `mkdir -p` creates intermediate directories as needed. To confirm completion, each directory component exists after execution without separate manual creation.
Incorrect Answers
A:Run `touch reports/2026/nov` as a directory constructor. This changes the workflow in the wrong way for mkdir -p nested directories. Plain mkdir on the deepest path fails when parents do not exist. For this task the appropriate operation is to run `mkdir -p reports/2026/nov` to create missing parents.
C:Assume `mkdir` without options always builds every missing parent. It would not produce the expected result: Each directory component exists after execution without separate manual creation. The named operation concerns mkdir -p nested directories.
D:Use `rmdir -p` to create missing ancestors. It does not meet the requirement in this case: A script must create `reports/2026/nov` under the home directory when parent folders are absent. `mkdir -p` creates intermediate directories as needed.
Question 23
A marketing assistant needs to crop and retouch photos for a Linux website. Which action BEST accomplishes the stated Linux task?
- Use GIMP for raster editing and export the required image format.
- Choose Apache HTTP Server as the image editor.
- Use MariaDB SQL commands to crop a photo.
- Treat LibreOffice Calc as a replacement for raster retouching.
Explanation
Correct Answer
A:Use GIMP for raster editing and export the required image format. GIMP edits raster images and is different from a database or spreadsheet program. To confirm completion, the edited image is saved in the requested raster format with the expected changes.
Incorrect Answers
B:Choose Apache HTTP Server as the image editor. It would not produce the expected result: The edited image is saved in the requested raster format with the expected changes. The named operation concerns GIMP raster image editing.
C:Use MariaDB SQL commands to crop a photo. This changes the workflow in the wrong way for GIMP raster image editing. Selecting a document viewer does not provide the required image-editing tools. For this task the appropriate operation is to use GIMP for raster editing and export the required image format.
D:Treat LibreOffice Calc as a replacement for raster retouching. It does not meet the requirement in this case: A marketing assistant needs to crop and retouch photos for a Linux website. GIMP edits raster images and is different from a database or spreadsheet program.
Question 24
A school evaluates an open-source application for handling student documents. Which action BEST accomplishes the stated Linux task?
- Grant every application full home-directory access by default.
- Assume public source code eliminates all software vulnerabilities.
- Disable security patches to stop unwanted network connections.
- Review application permissions, provenance, update policy and data-sharing settings.
Explanation
Correct Answer
D:Review application permissions, provenance, update policy and data-sharing settings. Source availability alone does not guarantee an application is secure or privacy-preserving. To confirm completion, installation consent and data-flow settings match the stated privacy needs.
Incorrect Answers
A:Grant every application full home-directory access by default. This changes the workflow in the wrong way for Privacy-conscious software selection. Installing untrusted code without reviewing access can expose files. For this task the appropriate operation is to review application permissions, provenance, update policy and data-sharing settings.
B:Assume public source code eliminates all software vulnerabilities. It does not meet the requirement in this case: A school evaluates an open-source application for handling student documents. Source availability alone does not guarantee an application is secure or privacy-preserving.
C:Disable security patches to stop unwanted network connections. It would not produce the expected result: Installation consent and data-flow settings match the stated privacy needs. The named operation concerns Privacy-conscious software selection.
Question 25
An administrator wants to see people currently logged into the host. Which action BEST accomplishes the stated Linux task?
- Use `free` to identify active users.
- Run `last` and assume it shows only current sessions.
- Use `who` or `w` for current sessions and `last` for login history where recorded.
- Use `groupadd` to list interactive logins.
Explanation
Correct Answer
C:Use `who` or `w` for current sessions and `last` for login history where recorded. Login-session reporting differs from process snapshots and account databases. To confirm completion, the output distinguishes current users from previously recorded login sessions.
Incorrect Answers
A:This changes the workflow in the wrong way for who w and last login activity.
B:Run `last` and assume it shows only current sessions. It does not meet the requirement in this case: An administrator wants to see people currently logged into the host. Login-session reporting differs from process snapshots and account databases.
D:Use `groupadd` to list interactive logins. It would not produce the expected result: The output distinguishes current users from previously recorded login sessions. The named operation concerns who w and last login activity.
Question 26
A newly installed executable cannot be called by its bare name although it exists in `/opt/tools/bin`. Which action BEST accomplishes the stated Linux task?
- Add the executable directory to `PATH` or invoke the executable by its explicit path.
- Add a documentation file to PATH as if it were a directory.
- Copy the binary name into the shell prompt without a file.
- Change `HOME` and assume PATH updates automatically.
Explanation
Correct Answer
A:Add the executable directory to `PATH` or invoke the executable by its explicit path. PATH is a colon-separated list of directories the shell searches for command names. To confirm completion, the command resolves to the intended executable from a directory on the search path.
Incorrect Answers
B:Add a documentation file to PATH as if it were a directory. It would not produce the expected result: The command resolves to the intended executable from a directory on the search path. The named operation concerns PATH and command discovery.
C:Copy the binary name into the shell prompt without a file. It does not meet the requirement in this case: A newly installed executable cannot be called by its bare name although it exists in `/opt/tools/bin`. PATH is a colon-separated list of directories the shell searches for command names.
D:Change `HOME` and assume PATH updates automatically. This changes the workflow in the wrong way for PATH and command discovery. A command outside PATH may require a qualified path. For this task the appropriate operation is to add the executable directory to `PATH` or invoke the executable by its explicit path.
Question 27
A student wants to count lines that contain `failed` without creating a temporary file. Which action BEST accomplishes the stated Linux task?
- Use `>` between commands to execute a pipe.
- Put two commands on separate lines and assume their output is automatically linked.
- Use `&&` expecting filtered text to become standard input.
- Run a pipeline such as `grep 'failed' log | wc -l`.
Explanation
Correct Answer
D:Run a pipeline such as `grep 'failed' log | wc -l`. `|` passes one command's standard output to the next command's standard input. To confirm completion, the count reflects only the lines sent from grep through the pipe.
Incorrect Answers
A:Use `>` between commands to execute a pipe. This changes the workflow in the wrong way for Pipes connecting commands. Running commands separately without connecting streams does not build the same pipeline. For this task the appropriate operation is to run a pipeline such as `grep 'failed' log | wc -l`.
B:Put two commands on separate lines and assume their output is automatically linked. It would not produce the expected result: The count reflects only the lines sent from grep through the pipe. The named operation concerns Pipes connecting commands.
C:Use `&&` expecting filtered text to become standard input. It does not meet the requirement in this case: A student wants to count lines that contain `failed` without creating a temporary file. `|` passes one command's standard output to the next command's standard input.
Question 28
A photographer shares documentation illustrations while a developer licenses executable source code. Which action BEST accomplishes the stated Linux task?
- Apply a trademark registration as if it were a complete software copyright license.
- Use a suitable Creative Commons license for creative content and a software-focused license for code.
- Assume CC BY-NC permits every possible commercial reuse.
- Treat an unlicensed photograph as automatically public domain.
Explanation
Correct Answer
B:Use a suitable Creative Commons license for creative content and a software-focused license for code. Creative Commons licenses are frequently used for creative works whereas software licenses address source-code distribution. To confirm completion, documentation and code carry clear licenses appropriate to their materials.
Incorrect Answers
A:Apply a trademark registration as if it were a complete software copyright license. It would not produce the expected result: Documentation and code carry clear licenses appropriate to their materials. The named operation concerns Creative Commons and software licensing.
C:This changes the workflow in the wrong way for Creative Commons and software licensing.
D:Treat an unlicensed photograph as automatically public domain. It does not meet the requirement in this case: A photographer shares documentation illustrations while a developer licenses executable source code. Creative Commons licenses are frequently used for creative works whereas software licenses address source-code distribution.
Question 29
A student needs to inspect a file's owner, group, size and permissions. Which action BEST accomplishes the stated Linux task?
- Run `touch` to display current file permissions.
- Use `ls -a` alone as the long-format metadata command.
- Run `ls -l` on the requested path.
- Expect `pwd` to print file ownership columns.
Explanation
Correct Answer
C:Run `ls -l` on the requested path. The `-l` option provides long-format metadata rather than only names. To confirm completion, the listing includes permission bits, ownership and other metadata.
Incorrect Answers
A:Run `touch` to display current file permissions. It would not produce the expected result: The listing includes permission bits, ownership and other metadata. The named operation concerns ls -l file metadata.
B:Use `ls -a` alone as the long-format metadata command. This changes the workflow in the wrong way for ls -l file metadata. Choosing a recursive option does not alone guarantee long-format columns. For this task the appropriate operation is to run `ls -l` on the requested path.
D:Expect `pwd` to print file ownership columns. It does not meet the requirement in this case: A student needs to inspect a file's owner, group, size and permissions. The `-l` option provides long-format metadata rather than only names.
Question 30
A writer wants to rename `draft.md` to `final.md` without retaining both names. Which action BEST accomplishes the stated Linux task?
- Delete the source before confirming a copied destination.
- Use `mv` with the original and destination paths.
- Use `cp` and assume the original automatically disappears.
- Run `touch` to rename an existing file.
Explanation
Correct Answer
B:Use `mv` with the original and destination paths. `mv` renames or relocates filesystem objects rather than duplicating them. To confirm completion, the destination path exists and the original name no longer refers to the same entry.
Incorrect Answers
A:Delete the source before confirming a copied destination. It would not produce the expected result: The destination path exists and the original name no longer refers to the same entry. The named operation concerns mv rename and relocation.
C:Use `cp` and assume the original automatically disappears. This changes the workflow in the wrong way for mv rename and relocation. Using `cp` leaves the original behind when a move was required. For this task the appropriate operation is to use `mv` with the original and destination paths.
D:Run `touch` to rename an existing file. It does not meet the requirement in this case: A writer wants to rename `draft.md` to `final.md` without retaining both names. `mv` renames or relocates filesystem objects rather than duplicating them.