LPI 010-160 Practice Test 85
Question 840
A background command is still running and an operator wants its process identifier. Select THREE statements that together form an appropriate implementation and validation plan.
- Run `free` to list all process command lines.
- Use `touch` to obtain the PID list.
- Expect `ls -a` to show active process state.
- Run `ps` with suitable options for the relevant process set.
- `ps` provides a snapshot of processes, not continuously updated interactive monitoring.
- The listing includes process IDs and command information.
Explanation
Correct Answers
D:Run `ps` with suitable options for the relevant process set. This is the actual implementation for ps process listing.
E:`ps` provides a snapshot of processes, not continuously updated interactive monitoring. This is the governing technical reason for the chosen solution.
F:The listing includes process IDs and command information. This provides direct evidence of the intended ps process listing behavior.
Incorrect Answers
A:Run `free` to list all process command lines. This does not contribute a sound implementation or validation step for ps process listing. Reading disk capacity cannot identify all running processes.
B:Use `touch` to obtain the PID list. This does not contribute a sound implementation or validation step for ps process listing. Reading disk capacity cannot identify all running processes.
C:Expect `ls -a` to show active process state. This does not contribute a sound implementation or validation step for ps process listing. Reading disk capacity cannot identify all running processes.
Question 841
A script must create `reports/2026/nov` under the home directory when parent folders are absent. Select TWO statements that together form an appropriate implementation and validation plan.
- Run `mkdir -p reports/2026/nov` to create missing parents.
- Run `touch reports/2026/nov` as a directory constructor.
- Assume `mkdir` without options always builds every missing parent.
- Each directory component exists after execution without separate manual creation.
- Use `rmdir -p` to create missing ancestors.
Explanation
Correct Answers
A:Run `mkdir -p reports/2026/nov` to create missing parents. This is the actual implementation for mkdir -p nested directories.
D:Each directory component exists after execution without separate manual creation. This provides direct evidence of the intended mkdir -p nested directories behavior.
Incorrect Answers
B:Run `touch reports/2026/nov` as a directory constructor. This does not contribute a sound implementation or validation step for mkdir -p nested directories. Plain mkdir on the deepest path fails when parents do not exist.
C:Assume `mkdir` without options always builds every missing parent. This does not contribute a sound implementation or validation step for mkdir -p nested directories. Plain mkdir on the deepest path fails when parents do not exist.
E:Use `rmdir -p` to create missing ancestors. This does not contribute a sound implementation or validation step for mkdir -p nested directories. Plain mkdir on the deepest path fails when parents do not exist.
Question 842
An administrator creates a user and must set an initial login password securely. Select TWO statements that together form an appropriate implementation and validation plan.
- Echo a plaintext password into `/etc/passwd`.
- Use `passwd username` as an administrator or `passwd` for the current account.
- Use `groupadd` as the password-setting command.
- Authentication accepts the updated password according to the system's policies.
- Rename the home directory to rotate credentials.
Explanation
Correct Answers
B:Use `passwd username` as an administrator or `passwd` for the current account. This is the actual implementation for passwd setting account password.
D:Authentication accepts the updated password according to the system's policies. This provides direct evidence of the intended passwd setting account password behavior.
Incorrect Answers
A:Echo a plaintext password into `/etc/passwd`. This does not contribute a sound implementation or validation step for passwd setting account password. Creating a user does not necessarily provision a usable password login by itself.
C:Use `groupadd` as the password-setting command. This does not contribute a sound implementation or validation step for passwd setting account password. Creating a user does not necessarily provision a usable password login by itself.
E:Rename the home directory to rotate credentials. This does not contribute a sound implementation or validation step for passwd setting account password. Creating a user does not necessarily provision a usable password login by itself.
Question 843
A user edits a small shell script in the terminal using nano. Select TWO statements that together form an appropriate implementation and validation plan.
- Run `cat filename` as an interactive full-screen editor.
- Open the file with `nano filename`, edit, save and exit using nano's documented key shortcuts.
- Use `rm filename` to write new script text.
- The saved file contains the intended text after leaving the editor.
- Use `less filename` and expect to save typed changes.
Explanation
Correct Answers
B:Open the file with `nano filename`, edit, save and exit using nano's documented key shortcuts. This is the actual implementation for nano editor save and quit.
D:The saved file contains the intended text after leaving the editor. This provides direct evidence of the intended nano editor save and quit behavior.
Incorrect Answers
A:Run `cat filename` as an interactive full-screen editor. This does not contribute a sound implementation or validation step for nano editor save and quit. A viewer-only command does not save file modifications.
C:Use `rm filename` to write new script text. This does not contribute a sound implementation or validation step for nano editor save and quit. A viewer-only command does not save file modifications.
E:Use `less filename` and expect to save typed changes. This does not contribute a sound implementation or validation step for nano editor save and quit. A viewer-only command does not save file modifications.
Question 844
A user needs locally installed package documentation on a Debian-like system. Select THREE statements that together form an appropriate implementation and validation plan.
- Assume `/dev/null` stores installed package manuals.
- Look under `/usr/share/doc/` for the installed package's documentation.
- Use `/proc/uptime` as a software README.
- Search only `/tmp` for permanent packaged guides.
- Package-specific README or documentation files can be opened when installed.
- Distributions often place packaged documentation under `/usr/share/doc`.
Explanation
Correct Answers
B:Look under `/usr/share/doc/` for the installed package's documentation. This is the actual implementation for /usr/share/doc documentation directory.
E:Package-specific README or documentation files can be opened when installed. This provides direct evidence of the intended /usr/share/doc documentation directory behavior.
F:Distributions often place packaged documentation under `/usr/share/doc`. This is the governing technical reason for the chosen solution.
Incorrect Answers
A:Assume `/dev/null` stores installed package manuals. This does not contribute a sound implementation or validation step for /usr/share/doc documentation directory. Using a log directory as the only documentation source can miss package instructions.
C:Use `/proc/uptime` as a software README. This does not contribute a sound implementation or validation step for /usr/share/doc documentation directory. Using a log directory as the only documentation source can miss package instructions.
D:Search only `/tmp` for permanent packaged guides. This does not contribute a sound implementation or validation step for /usr/share/doc documentation directory. Using a log directory as the only documentation source can miss package instructions.
Question 845
A service fails during startup and an operator needs stored diagnostic logs. Select TWO statements that together form an appropriate implementation and validation plan.
- Inspect `/boot` as the universal application log folder.
- Relevant diagnostic entries appear in the configured log destination.
- Look under `/var/log` or the distribution's documented logging facility.
- Use `/dev/null` to recover historic logs.
- Treat `/usr/share/doc` as the only live logging directory.
Explanation
Correct Answers
B:Relevant diagnostic entries appear in the configured log destination. This provides direct evidence of the intended /var/log system messages behavior.
C:Look under `/var/log` or the distribution's documented logging facility. This is the actual implementation for /var/log system messages.
Incorrect Answers
A:Inspect `/boot` as the universal application log folder. This does not contribute a sound implementation or validation step for /var/log system messages. The wrong filesystem directory may hide important diagnostics.
D:Use `/dev/null` to recover historic logs. This does not contribute a sound implementation or validation step for /var/log system messages. The wrong filesystem directory may hide important diagnostics.
E:Treat `/usr/share/doc` as the only live logging directory. This does not contribute a sound implementation or validation step for /var/log system messages. The wrong filesystem directory may hide important diagnostics.
Question 846
A project has nested directories and an operator wants to list contents at every level. Select TWO statements that together form an appropriate implementation and validation plan.
- Assume `ls -a` alone visits all child directories.
- Use `ls -R` for a recursive listing of the directory hierarchy.
- Entries from subdirectories appear below their corresponding directory labels.
- Use `ls -d` expecting full recursive contents.
- Run `pwd -R` to list files.
Explanation
Correct Answers
B:Use `ls -R` for a recursive listing of the directory hierarchy. This is the actual implementation for Recursive directory listings.
C:Entries from subdirectories appear below their corresponding directory labels. This provides direct evidence of the intended Recursive directory listings behavior.
Incorrect Answers
A:Assume `ls -a` alone visits all child directories. This does not contribute a sound implementation or validation step for Recursive directory listings. Plain `ls` on the top directory omits many descendants.
D:Use `ls -d` expecting full recursive contents. This does not contribute a sound implementation or validation step for Recursive directory listings. Plain `ls` on the top directory omits many descendants.
E:Run `pwd -R` to list files. This does not contribute a sound implementation or validation step for Recursive directory listings. Plain `ls` on the top directory omits many descendants.
Question 847
An administrator wants to know whether `cd` is a shell builtin. Select TWO statements that together form an appropriate implementation and validation plan.
- Run `chmod` to identify whether a command is builtin.
- Expect `ls -l` to reveal all aliases.
- Use `cat cd` to classify the shell builtin.
- Use `type cd` or `type name` to examine how Bash interprets the command.
- The result identifies a builtin, alias, keyword or executable as applicable.
Explanation
Correct Answers
D:Use `type cd` or `type name` to examine how Bash interprets the command. This is the actual implementation for type and builtin identification.
E:The result identifies a builtin, alias, keyword or executable as applicable. This provides direct evidence of the intended type and builtin identification behavior.
Incorrect Answers
A:Run `chmod` to identify whether a command is builtin. This does not contribute a sound implementation or validation step for type and builtin identification. Using the file viewer cannot reveal all shell alias resolution paths.
B:Expect `ls -l` to reveal all aliases. This does not contribute a sound implementation or validation step for type and builtin identification. Using the file viewer cannot reveal all shell alias resolution paths.
C:Use `cat cd` to classify the shell builtin. This does not contribute a sound implementation or validation step for type and builtin identification. Using the file viewer cannot reveal all shell alias resolution paths.
Question 848
A report must be writable by its owner, readable by its group, and inaccessible to others. Select TWO statements that together form an appropriate implementation and validation plan.
- Set `chmod 644` and assume others receive no permissions.
- Use `chmod 000` while expecting the owner to keep write access.
- The resulting permissions are `rw- r-- ---` for owner, group and others.
- Run `chmod 640 report.txt`.
- Run `chmod 777 report.txt` to keep others from reading.
Explanation
Correct Answers
C:The resulting permissions are `rw- r-- ---` for owner, group and others. This provides direct evidence of the intended chmod octal mode 640 behavior.
D:Run `chmod 640 report.txt`. This is the actual implementation for chmod octal mode 640. With octal 640, the owner can read and write, the group can read, and others have no access.
Incorrect Answers
A:Set `chmod 644` and assume others receive no permissions. This does not contribute a sound implementation or validation step for chmod octal mode 640. Choosing 644 would allow other users to read the report.
B:Use `chmod 000` while expecting the owner to keep write access. This does not contribute a sound implementation or validation step for chmod octal mode 640. Choosing 644 would allow other users to read the report.
E:Run `chmod 777 report.txt` to keep others from reading. This does not contribute a sound implementation or validation step for chmod octal mode 640. Choosing 644 would allow other users to read the report.
Question 849
A desktop user prefers point-and-click editing but must occasionally enter Linux commands. Select TWO statements that together form an appropriate implementation and validation plan.
- Treat the desktop wallpaper as the command interpreter.
- Commands execute in a shell session while graphical tools run through the desktop.
- Assume Linux cannot have both GUI and terminal interfaces.
- Open a terminal emulator for shell commands and use desktop applications for GUI tasks.
- Type `ls` into a spreadsheet cell expecting a directory listing.
Explanation
Correct Answers
B:Commands execute in a shell session while graphical tools run through the desktop. This provides direct evidence of the intended Graphical desktop versus command line behavior.
D:Open a terminal emulator for shell commands and use desktop applications for GUI tasks. This is the actual implementation for Graphical desktop versus command line.
Incorrect Answers
A:Treat the desktop wallpaper as the command interpreter. This does not contribute a sound implementation or validation step for Graphical desktop versus command line. Typing a shell command into a browser search field does not execute it locally.
C:Assume Linux cannot have both GUI and terminal interfaces. This does not contribute a sound implementation or validation step for Graphical desktop versus command line. Typing a shell command into a browser search field does not execute it locally.
E:Type `ls` into a spreadsheet cell expecting a directory listing. This does not contribute a sound implementation or validation step for Graphical desktop versus command line. Typing a shell command into a browser search field does not execute it locally.
Question 850
A file has codes such as `cat` and `cot` and the search should match one character in a given set. Select TWO statements that together form an appropriate implementation and validation plan.
- Use a bracket expression such as `grep 'c[ao]t' file`.
- Use `grep 'c(ao)t'` as a basic-regex guarantee of either character.
- Treat `*` as a shell filename wildcard inside every regular expression.
- Use `wc -w` to match the regular expression.
- Lines containing either indicated single-character alternative match.
Explanation
Correct Answers
A:Use a bracket expression such as `grep 'c[ao]t' file`. This is the actual implementation for Basic regular-expression character classes.
E:Lines containing either indicated single-character alternative match. This provides direct evidence of the intended Basic regular-expression character classes behavior.
Incorrect Answers
B:Use `grep 'c(ao)t'` as a basic-regex guarantee of either character. This does not contribute a sound implementation or validation step for Basic regular-expression character classes. Literal unquoted brackets or the wrong pattern can change the match set.
C:Treat `*` as a shell filename wildcard inside every regular expression. This does not contribute a sound implementation or validation step for Basic regular-expression character classes. Literal unquoted brackets or the wrong pattern can change the match set.
D:Use `wc -w` to match the regular expression. This does not contribute a sound implementation or validation step for Basic regular-expression character classes. Literal unquoted brackets or the wrong pattern can change the match set.