LPI 010-160 Practice Test 19
Question 180
An administrator needs to understand why filesystem ownership uses numeric UIDs. Which command or configuration decision is MOST appropriate?
- Give every standard account UID 0.
- Use `usermod -aG project username` or an approved equivalent to append group membership.
- Assign a unique suitable UID to each local account under the site's account policy.
- Use identical UID values for unrelated tenants without review.
Explanation
Correct Answer
C:Success would be shown when distinct local users map to their intended UID records.
Incorrect Answers
A:Give every standard account UID 0. For the specified situation, this is not equivalent to assign a unique suitable UID to each local account under the site's account policy. Reusing a UID for unrelated users may unintentionally share ownership rights.
B:Use `usermod -aG project username` or an approved equivalent to append group membership. This instead targets Supplementary group membership, not the specific UID uniqueness and identity mapping requirement in the question. Distinct local users map to their intended UID records.
D:Use identical UID values for unrelated tenants without review. For the specified situation, this is not equivalent to assign a unique suitable UID to each local account under the site's account policy. Reusing a UID for unrelated users may unintentionally share ownership rights.
Question 181
A laboratory compares mechanical hard drives with solid-state storage. Which command or configuration decision is MOST appropriate?
- Diagnose CPU capacity for computation and RAM capacity for active working data.
- Upgrade only the graphics driver to replace slow spinning disk seeks.
- Select SSD storage where lower seek latency and random I/O are important.
- Assume all HDDs have no moving mechanical parts.
Explanation
Correct Answer
C:Select SSD storage where lower seek latency and random I/O are important. The same SSD versus rotational disk principle applies in this second case. SSDs store data without mechanical moving heads while HDDs use rotating media. Success would be shown when read and write tests show storage performance consistent with the selected medium.
Incorrect Answers
A:Diagnose CPU capacity for computation and RAM capacity for active working data. This instead targets CPU and RAM responsibilities, not the specific SSD versus rotational disk requirement in the question. Read and write tests show storage performance consistent with the selected medium.
B:Upgrade only the graphics driver to replace slow spinning disk seeks. For the specified situation, this is not equivalent to select SSD storage where lower seek latency and random I/O are important. Confusing storage access time with CPU clock rate misdiagnoses delays.
D:Assume all HDDs have no moving mechanical parts. For the specified situation, this is not equivalent to select SSD storage where lower seek latency and random I/O are important. Confusing storage access time with CPU clock rate misdiagnoses delays.
Question 182
A learner sees references to `passwd(1)` and `passwd(5)` and needs the correct manual. Which command or configuration decision is MOST appropriate?
- Assume a shared name means all manual sections contain identical text.
- Use `man 1 passwd` to read `/etc/passwd` file syntax.
- Run `command --help` when the utility supports that convention.
- Specify the manual section, for example `man 5 passwd`, when the subject is the file format.
Explanation
Correct Answer
D:Success would be shown when the selected manual describes the requested topic rather than the other same-named entry.
Incorrect Answers
A:Reading a command synopsis as a file-format specification causes confusion. For the specified situation, this is not equivalent to specify the manual section, for example `man 5 passwd`, when the subject is the file format.
B:Reading a command synopsis as a file-format specification causes confusion. Use `man 1 passwd` to read `/etc/passwd` file syntax.
C:Run `command --help` when the utility supports that convention. This instead targets Command --help output, not the specific Manual sections for commands and config requirement in the question. The selected manual describes the requested topic rather than the other same-named entry.
Question 183
A monitoring script needs to add one new line without erasing prior entries. Which command or configuration decision is MOST appropriate?
- Assume `>>` always truncates the file first.
- Use `>` when the requirement is to keep all earlier lines.
- Run `sort file` or pipe records into sort.
- Use `>` to overwrite stdout to a file and `>>` to append stdout to the file.
Explanation
Correct Answer
D:Use `>` to overwrite stdout to a file and `>>` to append stdout to the file. The same Redirecting output and append principle applies in this second case. Shell redirection changes file-writing behavior before a program processes its arguments. Success would be shown when the target file is replaced or extended according to the chosen operator.
Incorrect Answers
A:The wrong operator can discard previous output or accumulate stale content. For the specified situation, this is not equivalent to use `>` to overwrite stdout to a file and `>>` to append stdout to the file.
B:The wrong operator can discard previous output or accumulate stale content. Use `>` when the requirement is to keep all earlier lines.
C:Run `sort file` or pipe records into sort. This instead targets sort text records, not the specific Redirecting output and append requirement in the question. The target file is replaced or extended according to the chosen operator.
Question 184
An administrator asks where sysfs presents devices and their attributes. Which command or configuration decision is MOST appropriate?
- Inspect `/sys` for supported sysfs device attributes.
- Assume `/sys` contains only compressed backups.
- Recognize `/dev` as the directory containing device nodes and related special files.
- Treat `/sys` as the default place for user photos.
Explanation
Correct Answer
A:Inspect `/sys` for supported sysfs device attributes. The same /sys device and kernel interfaces principle applies in this second case. sysfs exposes kernel device and subsystem objects through a virtual filesystem. Success would be shown when the queried device or subsystem attributes reflect the active kernel state.
Incorrect Answers
B:Mistaking sysfs for a persistent user-data directory can corrupt an investigation. For the specified situation, this is not equivalent to inspect `/sys` for supported sysfs device attributes.
C:Recognize `/dev` as the directory containing device nodes and related special files. This instead targets /dev device nodes, not the specific /sys device and kernel interfaces requirement in the question. The queried device or subsystem attributes reflect the active kernel state.
D:Mistaking sysfs for a persistent user-data directory can corrupt an investigation. Treat `/sys` as the default place for user photos.
Question 185
An administrator checks a script's permission bits before sharing it. Which command or configuration decision is MOST appropriate?
- Treat the initial `-` in the listing as a write bit.
- Read the three user/group/other triples in `ls -l` output.
- Use `chown username file` with required privileges.
- Assume `rwx` applies to everyone regardless of its position.
Explanation
Correct Answer
B:Read the three user/group/other triples in `ls -l` output. The same ls -l permission string interpretation principle applies in this second case. The first character identifies object type and the following triples show permissions. Success would be shown when the displayed permissions indicate the intended read, write and execute rights per class.
Incorrect Answers
A:Misreading a group bit as an owner bit can lead to wrong access decisions. For the specified situation, this is not equivalent to read the three user/group/other triples in `ls -l` output.
C:Use `chown username file` with required privileges. This instead targets chown file ownership, not the specific ls -l permission string interpretation requirement in the question. The displayed permissions indicate the intended read, write and execute rights per class.
D:Misreading a group bit as an owner bit can lead to wrong access decisions. Assume `rwx` applies to everyone regardless of its position.
Question 186
A hardware technician maps USB peripherals to the main system board. Which command or configuration decision is MOST appropriate?
- Call the operating system kernel the motherboard.
- Recognize the motherboard as the primary board interconnecting core components and peripherals.
- Classify a USB mouse as the system's RAM.
- Diagnose CPU capacity for computation and RAM capacity for active working data.
Explanation
Correct Answer
B:Recognize the motherboard as the primary board interconnecting core components and peripherals. The same Motherboard and peripherals principle applies in this second case. The motherboard provides electrical and communication pathways between system components. Success would be shown when component slots and buses connect through the board's interfaces.
Incorrect Answers
A:Call the operating system kernel the motherboard. For the specified situation, this is not equivalent to recognize the motherboard as the primary board interconnecting core components and peripherals. Confusing removable peripherals with the motherboard misstates system architecture.
C:Classify a USB mouse as the system's RAM. For the specified situation, this is not equivalent to recognize the motherboard as the primary board interconnecting core components and peripherals. Confusing removable peripherals with the motherboard misstates system architecture.
D:Diagnose CPU capacity for computation and RAM capacity for active working data. This instead targets CPU and RAM responsibilities, not the specific Motherboard and peripherals requirement in the question. Component slots and buses connect through the board's interfaces.
Question 187
A trainee needs a snapshot of current processes under Linux. Which command or configuration decision is MOST appropriate?
- Inspect `/sys` for supported sysfs device attributes.
- Run `free` to list all process command lines.
- Run `ps` with suitable options for the relevant process set.
- Use `touch` to obtain the PID list.
Explanation
Correct Answer
C:Run `ps` with suitable options for the relevant process set. The same ps process listing principle applies in this second case. `ps` provides a snapshot of processes, not continuously updated interactive monitoring. Success would be shown when the listing includes process IDs and command information.
Incorrect Answers
A:Inspect `/sys` for supported sysfs device attributes. This instead targets /sys device and kernel interfaces, not the specific ps process listing requirement in the question. The listing includes process IDs and command information.
B:Run `free` to list all process command lines. For the specified situation, this is not equivalent to run `ps` with suitable options for the relevant process set. Reading disk capacity cannot identify all running processes.
D:Use `touch` to obtain the PID list. For the specified situation, this is not equivalent to run `ps` with suitable options for the relevant process set. Reading disk capacity cannot identify all running processes.
Question 188
A script should display a target path passed after its filename. Which command or configuration decision is MOST appropriate?
- Use `$?` to obtain the first filename.
- Use `for file in *.log; do ... "$file" ...; done` with quoted expansion.
- Use `$0` as the first user-supplied argument.
- Refer to `$1` in the script for the first positional argument.
Explanation
Correct Answer
D:Refer to `$1` in the script for the first positional argument. The same Positional command-line arguments principle applies in this second case. `$1` is Bash's first positional parameter, while `$0` is the script name. Success would be shown when the script uses the value supplied as its first command-line argument.
Incorrect Answers
A:Use `$?` to obtain the first filename. For the specified situation, this is not equivalent to refer to `$1` in the script for the first positional argument. Confusing parameter indexes can print the wrong input.
B:Use `for file in *.log; do . "$file" .; done` with quoted expansion. This instead targets Loop over matching filenames, not the specific Positional command-line arguments requirement in the question. The script uses the value supplied as its first command-line argument.
C:Use `$0` as the first user-supplied argument. For the specified situation, this is not equivalent to refer to `$1` in the script for the first positional argument. Confusing parameter indexes can print the wrong input.
Question 189
A script author needs to distinguish a command name from its option and path operand. Which command or configuration decision is MOST appropriate?
- Treat `-l` as a universal shell variable.
- Use `/tmp` as an executable to list itself.
- Run `history` in an interactive Bash shell.
- Treat `ls` as the command, `-l` as the option and `/tmp` as its argument.
Explanation
Correct Answer
D:The same Bash command and argument structure principle applies in this second case.
Incorrect Answers
A:Treat `-l` as a universal shell variable. For the specified situation, this is not equivalent to treat `ls` as the command, `-l` as the option and `/tmp` as its argument. Treating option flags as pathnames changes the operation.
B:Use `/tmp` as an executable to list itself. For the specified situation, this is not equivalent to treat `ls` as the command, `-l` as the option and `/tmp` as its argument. Treating option flags as pathnames changes the operation.
C:Run `history` in an interactive Bash shell. This instead targets Shell history recall, not the specific Bash command and argument structure requirement in the question. The output uses long listing format for the specified directory.
Question 190
A class compares active sessions with historical login records. Which command or configuration decision is MOST appropriate?
- Use `su - targetuser` where authorized and provide authentication as required.
- 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.
Explanation
Correct Answer
D:Use `who` or `w` for current sessions and `last` for login history where recorded. The same who w and last login activity principle applies in this second case. Login-session reporting differs from process snapshots and account databases. Success would be shown when the output distinguishes current users from previously recorded login sessions.
Incorrect Answers
A:Use `su - targetuser` where authorized and provide authentication as required. This instead targets su switching user identity, not the specific who w and last login activity requirement in the question. The output distinguishes current users from previously recorded login sessions.
B:Use `free` to identify active users. For the specified situation, this is not equivalent to use `who` or `w` for current sessions and `last` for login history where recorded. 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. For the specified situation, this is not equivalent to use `who` or `w` for current sessions and `last` for login history where recorded. Treating a login-history command as a list of all installed users gives incorrect scope.