LPI 010-160 Practice Test 6
Question 50
An administrator wants to know whether `cd` is a shell builtin. Which action BEST accomplishes the stated Linux task?
- Expect `ls -l` to reveal all aliases.
- Run `chmod` to identify whether a command is builtin.
- Use `cat cd` to classify the shell builtin.
- Use `type cd` or `type name` to examine how Bash interprets the command.
Explanation
Correct Answer
D:Use `type cd` or `type name` to examine how Bash interprets the command. Bash `type` reports command interpretation rather than a file's content type. To confirm completion, the result identifies a builtin, alias, keyword or executable as applicable.
Incorrect Answers
A:Expect `ls -l` to reveal all aliases. It does not meet the requirement in this case: An administrator wants to know whether `cd` is a shell builtin. Bash `type` reports command interpretation rather than a file's content type.
B:Run `chmod` to identify whether a command is builtin. It would not produce the expected result: The result identifies a builtin, alias, keyword or executable as applicable. The named operation concerns type and builtin identification.
C:This changes the workflow in the wrong way for type and builtin identification.
Question 51
A script should process every `.log` file in its current directory. Which action BEST accomplishes the stated Linux task?
- Use `for file in *.log; do ... "$file" ...; done` with quoted expansion.
- Use `echo "$file"` outside the loop expecting all files.
- Run `rm *.log` instead of iterating when processing is required.
- Write `for file in '*.log'` expecting shell expansion of the quoted pattern.
Explanation
Correct Answer
A:Use `for file in *.log; do . "$file" .; done` with quoted expansion. A pathname glob can supply the loop's items while quoted variable expansion preserves each filename. To confirm completion, each matched filename is processed as its own argument.
Incorrect Answers
B:Use `echo "$file"` outside the loop expecting all files. It would not produce the expected result: Each matched filename is processed as its own argument. The named operation concerns Loop over matching filenames.
C:Run `rm *.log` instead of iterating when processing is required. It does not meet the requirement in this case: A script should process every `.log` file in its current directory. A pathname glob can supply the loop's items while quoted variable expansion preserves each filename.
D:This changes the workflow in the wrong way for Loop over matching filenames.
Question 52
A school wants a dependable Linux desktop for scheduled exams rather than experimental releases. Which action BEST accomplishes the stated Linux task?
- Avoid all security updates to keep applications stable.
- Treat every rolling distribution snapshot as a beta by definition.
- Prefer a supported stable release for production and reserve beta builds for testing.
- Assume a development preview has the same production guarantee as stable.
Explanation
Correct Answer
C:Prefer a supported stable release for production and reserve beta builds for testing. Stable release channels prioritize reliability while betas exist for testing upcoming changes. To confirm completion, the chosen release has a published support/update status rather than pre-release warnings.
Incorrect Answers
A:Avoid all security updates to keep applications stable. It does not meet the requirement in this case: A school wants a dependable Linux desktop for scheduled exams rather than experimental releases. Stable release channels prioritize reliability while betas exist for testing upcoming changes.
B:Treat every rolling distribution snapshot as a beta by definition. It would not produce the expected result: The chosen release has a published support/update status rather than pre-release warnings. The named operation concerns Stable versus beta distribution releases.
D:This changes the workflow in the wrong way for Stable versus beta distribution releases.
Question 53
A company wishes to integrate permissively licensed source into another product. Which action BEST accomplishes the stated Linux task?
- Follow the specific BSD-style license's notice and attribution conditions when redistributing.
- Classify every BSD-style license as public domain.
- Remove all original license notices from redistributions.
- Assume BSD licenses always require proprietary products to publish all source.
Explanation
Correct Answer
A:Follow the specific BSD-style license's notice and attribution conditions when redistributing. Permissive licenses often permit proprietary incorporation while requiring specified notices. To confirm completion, redistribution retains the required copyright and license notices.
Incorrect Answers
B:Classify every BSD-style license as public domain. It would not produce the expected result: Redistribution retains the required copyright and license notices. The named operation concerns Permissive BSD-style licensing.
C:Remove all original license notices from redistributions. It does not meet the requirement in this case: A company wishes to integrate permissively licensed source into another product. Permissive licenses often permit proprietary incorporation while requiring specified notices.
D:This changes the workflow in the wrong way for Permissive BSD-style licensing.
Question 54
A colleague sends a `.bz2`-compressed text file that needs decompression. Which action BEST accomplishes the stated Linux task?
- Rename the suffix to .gz without recompressing.
- Run `gunzip` as the guaranteed decoder for arbitrary .bz2 data.
- Run `unzip` on every .bz2 stream expecting ZIP entries.
- Use `bzip2` to compress and `bunzip2` or `bzip2 -d` to decompress.
Explanation
Correct Answer
D:Use `bzip2` to compress and `bunzip2` or `bzip2 -d` to decompress. bzip2 is a compression format distinct from gzip and xz. To confirm completion, the decompressed file matches the original content.
Incorrect Answers
A:Rename the suffix to .gz without recompressing. It does not meet the requirement in this case: A colleague sends a `.bz2`-compressed text file that needs decompression. bzip2 is a compression format distinct from gzip and xz.
B:This changes the workflow in the wrong way for bzip2 compressed streams.
C:Run `unzip` on every .bz2 stream expecting ZIP entries. It would not produce the expected result: The decompressed file matches the original content. The named operation concerns bzip2 compressed streams.
Question 55
An administrator creates a user and must set an initial login password securely. Which action BEST accomplishes the stated Linux task?
- Use `groupadd` as the password-setting command.
- Rename the home directory to rotate credentials.
- Use `passwd username` as an administrator or `passwd` for the current account.
- Echo a plaintext password into `/etc/passwd`.
Explanation
Correct Answer
C:Use `passwd username` as an administrator or `passwd` for the current account. passwd changes account authentication credentials through supported account-management interfaces. To confirm completion, authentication accepts the updated password according to the system's policies.
Incorrect Answers
A:This changes the workflow in the wrong way for passwd setting account password.
B:Rename the home directory to rotate credentials. It would not produce the expected result: Authentication accepts the updated password according to the system's policies. The named operation concerns passwd setting account password.
D:Echo a plaintext password into `/etc/passwd`. It does not meet the requirement in this case: An administrator creates a user and must set an initial login password securely. passwd changes account authentication credentials through supported account-management interfaces.
Question 56
A user wants a convenient alternate pathname to an existing configuration file. Which action BEST accomplishes the stated Linux task?
- Rename the file extension to create a link.
- Run `ln -s target linkname` to create a symbolic link.
- Use `cp` and assume it creates a symbolic link by default.
- Run `ln target linkname` and claim it must be symbolic.
Explanation
Correct Answer
B:Run `ln -s target linkname` to create a symbolic link. A symbolic link stores a path reference and can point across filesystems. To confirm completion, the link resolves to the target when the path is valid.
Incorrect Answers
A:Rename the file extension to create a link. It would not produce the expected result: The link resolves to the target when the path is valid. The named operation concerns Symbolic links with ln -s.
C:This changes the workflow in the wrong way for Symbolic links with ln -s.
D:Run `ln target linkname` and claim it must be symbolic. It does not meet the requirement in this case: A user wants a convenient alternate pathname to an existing configuration file. A symbolic link stores a path reference and can point across filesystems.
Question 57
A Linux user must send several files in one ZIP archive to a colleague on another operating system. Which action BEST accomplishes the stated Linux task?
- Use `zip -r files.zip folder/` to create the archive and `unzip files.zip` to extract.
- Run `gunzip files.zip` as the standard ZIP extractor.
- Use `tar -cf` and expect an identical ZIP file format.
- Rename project.tar to files.zip without re-archiving.
Explanation
Correct Answer
A:Use `zip -r files.zip folder/` to create the archive and `unzip files.zip` to extract. ZIP combines archiving and compression in a widely supported container format. To confirm completion, the ZIP contains the intended file hierarchy and extracts successfully.
Incorrect Answers
B:This changes the workflow in the wrong way for ZIP archives and unzip.
C:Use `tar -cf` and expect an identical ZIP file format. It would not produce the expected result: The ZIP contains the intended file hierarchy and extracts successfully. The named operation concerns ZIP archives and unzip.
D:Rename project.tar to files.zip without re-archiving. It does not meet the requirement in this case: A Linux user must send several files in one ZIP archive to a colleague on another operating system. ZIP combines archiving and compression in a widely supported container format.
Question 58
A lab chooses openSUSE for a Linux workstation and needs an appropriate software-management approach. Which action BEST accomplishes the stated Linux task?
- Recognize openSUSE and SUSE as related Linux distributions with their supported RPM-based package tooling.
- Install unsigned Debian packages as the native SUSE repository format.
- Assume openSUSE is a Windows kernel implementation.
- Use Ubuntu LTS release dates as SUSE vendor support commitments.
Explanation
Correct Answer
A:Recognize openSUSE and SUSE as related Linux distributions with their supported RPM-based package tooling. SUSE Enterprise and openSUSE are related Linux distributions but have different release and support models. To confirm completion, the selected system's package-management commands and repositories correspond to its SUSE variant.
Incorrect Answers
B:Install unsigned Debian packages as the native SUSE repository format. It would not produce the expected result: The selected system's package-management commands and repositories correspond to its SUSE variant. The named operation concerns SUSE and openSUSE distributions.
C:This changes the workflow in the wrong way for SUSE and openSUSE distributions.
D:Use Ubuntu LTS release dates as SUSE vendor support commitments. It does not meet the requirement in this case: A lab chooses openSUSE for a Linux workstation and needs an appropriate software-management approach. SUSE Enterprise and openSUSE are related Linux distributions but have different release and support models.
Question 59
A user needs to see an interface's current IP address in Linux. Which action BEST accomplishes the stated Linux task?
- Run `ip route show` expecting all interface address records.
- Read only `/etc/hosts` to discover dynamic NIC assignments.
- Run `ip addr show` or target the particular interface.
- Use `chmod` to inspect IP addresses.
Explanation
Correct Answer
C:Run `ip addr show` or target the particular interface. IP address assignment and interface status are independent of DNS hostname resolution. To confirm completion, the output lists addresses assigned to the specified network interface.
Incorrect Answers
A:Run `ip route show` expecting all interface address records. This changes the workflow in the wrong way for ip addr show interface addresses. Looking only at resolver configuration cannot reveal all assigned interface addresses. For this task the appropriate operation is to run `ip addr show` or target the particular interface.
B:Read only `/etc/hosts` to discover dynamic NIC assignments. It does not meet the requirement in this case: A user needs to see an interface's current IP address in Linux. IP address assignment and interface status are independent of DNS hostname resolution.
D:Use `chmod` to inspect IP addresses. It would not produce the expected result: The output lists addresses assigned to the specified network interface. The named operation concerns ip addr show interface addresses.
Question 60
A workstation user wants to read and send email using a desktop open-source application. Which action BEST accomplishes the stated Linux task?
- Install MariaDB and assume it becomes a desktop mail reader.
- Use NGINX as an IMAP desktop mail client.
- Open GIMP to retrieve POP3 messages.
- Install and configure Thunderbird for the intended email account and server settings.
Explanation
Correct Answer
D:Install and configure Thunderbird for the intended email account and server settings. Thunderbird is an email client whereas a mail server handles delivery and mailbox hosting. To confirm completion, the client synchronizes incoming mail and sends mail through configured servers.
Incorrect Answers
A:Install MariaDB and assume it becomes a desktop mail reader. It would not produce the expected result: The client synchronizes incoming mail and sends mail through configured servers. The named operation concerns Thunderbird email client.
B:Confusing a web server with an email client will not offer the desired desktop inbox. This changes the workflow in the wrong way for Thunderbird email client.
C:Open GIMP to retrieve POP3 messages. It does not meet the requirement in this case: A workstation user wants to read and send email using a desktop open-source application. Thunderbird is an email client whereas a mail server handles delivery and mailbox hosting.