Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free GAQM Linux Certified Professional (LCP) LCP-001 Exam Questions

Last updated: · 14 practice questions with answers and explanations

Page: 1 / 20 Total 289 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Module 1

Skill tested: Relates filesystem metadata structures to recovery and data-location constraints.

A systems administrator is reviewing a traditional Unix filesystem after a power interruption. The machine can still read some files, but directory listings and file contents are inconsistent. A recovery specialist explains that the filesystem stores metadata separately from file data and that several filesystem regions may be affected. The organization needs to identify which structure normally contains the metadata describing an individual file, including its ownership, permissions, timestamps, and pointers to data blocks. Which structure should the administrator examine first?

Correct Answer: D. The inode block, which contains per-file metadata and references to data blocks.
Explanation:

An inode records metadata for an individual filesystem object, such as its type, ownership, permissions, timestamps, and references to the blocks holding its contents. Directory entries associate names with inode numbers. The boot block holds boot-related information, while the superblock describes filesystem-wide properties and state. Data blocks hold file contents or directory data, not the filesystem-wide mount information or all per-file metadata. This separation is important when diagnosing inconsistency because damage to metadata and damage to file contents have different consequences.

Question 2

New Single answer

Topic: Module 1

Skill tested: Selects a Linux installation partitioning approach that protects user data during reinstallation.

A small company is reinstalling Linux on a workstation that currently contains business documents in `/home`. The installer offers manual partitioning, and the machine has sufficient disk space for separate system and user-data filesystems. The company wants routine operating-system reinstalls to be less likely to overwrite user files, but it also requires a clean installation of the system directories. Which partitioning plan best meets these requirements?

Correct Answer: D. Create separate root (`/`) and `/home` filesystems, format `/`, and mount the existing `/home` without formatting it.
Explanation:

A separate `/home` filesystem allows the operating-system filesystem to be reformatted while preserving user data, provided the administrator correctly identifies and mounts the existing `/home` partition without formatting it. A single root filesystem does not provide that boundary, and symbolic links into `/usr` are not a substitute for sound partitioning. Formatting both filesystems defeats the protection, while installers cannot be assumed to preserve data in a shared root filesystem automatically. Backups remain necessary before any reinstallation.

Question 3

New Multiple answers

Topic: Module 2

Skill tested: Chooses reliable file-listing options to reveal hidden entries and inspect ownership and permissions.

A support team must audit a user's home directory before handing the workstation to another employee. The audit must include hidden configuration entries and show permissions, owner, group, size, and modification time. The team must inspect only that directory's immediate entries; recursively traversing subdirectories could expose unrelated mounted data and is prohibited. Which two commands satisfy the audit requirements? Select TWO.

Correct Answer: B. `ls -la /home/user`; E. `ls -lA /home/user`
Explanation:

Both `-l` and `-A` are needed: long format displays permissions, ownership, group, size, and time, while `-A` includes hidden entries but omits the special `.` and `..` entries. `-a` also includes hidden entries, so `ls -la` meets the stated audit need. The recursive forms descend into subdirectories and violate the scope restriction. `ls -ld` reports the directory itself rather than its entries. The two selected commands therefore provide the required immediate listing without recursion.

Question 4

New Single answer

Topic: Module 2

Skill tested: Selects a compression method that preserves a file and supports integrity verification.

A release engineer needs to compress a large log file for transfer to a partner. The original log must remain available unchanged, and the receiver needs a straightforward way to verify that the compressed stream is not corrupt before extracting it. The systems use standard GNU/Linux utilities, and no archive of multiple files is required. Which approach best satisfies these requirements?

Correct Answer: C. Run `gzip -c access.log > access.log.gz`, then have the receiver run `gzip -t access.log.gz` before decompression.
Explanation:

`gzip -c` writes compressed data to standard output, so redirecting it to a separate file preserves the original log. On receipt, `gzip -t` checks the gzip stream's integrity without extracting it. Plain `gzip access.log` normally replaces the input with a compressed file, which conflicts with retaining the original. The tar command creates an archive, which is unnecessary for a single file, and listing archive members is not equivalent to validating the gzip stream. Renaming bzip2 output cannot restore uncompressed contents.

Question 5

New Single answer

Topic: Module 2

Skill tested: Applies Unix communication commands while respecting recipient availability and message delivery constraints.

During a maintenance window, an operator must send a brief operational notice to one colleague who is currently logged in to a shared Unix host. The colleague's terminal permits interactive messages, and the notice must appear promptly rather than wait for the user's next login. The operator knows the colleague's login name but not the terminal device. Which command is the most appropriate?

Correct Answer: C. Use `write colleague`, enter the notice, and terminate the message with Ctrl-D.
Explanation:

`write` sends text to a specified logged-in user's terminal and is suitable for a direct, prompt notice when that terminal accepts messages. Ctrl-D ends the input. `mail` is asynchronous and depends on later mail access, so it does not meet the immediate-delivery requirement. `wall` broadcasts to multiple users rather than just the named colleague. `talk` starts an interactive conversation, which is unnecessary for a brief one-way notice and may require the recipient to participate.

Question 6

New Single answer

Topic: Module 2

Skill tested: Diagnoses host reachability and name-resolution failures using appropriate network commands.

A Linux application host can reach a partner service when the operator connects by its numeric IP address, but the application fails when configured with the partner's hostname. The host's default route is present, and other external names resolve correctly. The team needs to determine whether the failure is specific to the partner's DNS record or whether packets to the partner address are not reaching it. Which next action most directly separates these possibilities?

Correct Answer: D. Query the partner hostname with `host` or `nslookup`, then test the returned address with `ping` or `traceroute`.
Explanation:

A direct DNS lookup establishes whether the partner name resolves and what address it returns. Testing that address separately with a reachability tool helps distinguish name-resolution trouble from a network path or remote-host problem, while recognizing that ICMP filtering can make ping inconclusive. Changing interface configuration is unjustified when numeric connectivity already works. A routing-table display cannot prove a particular name resolves, and restarting networking before collecting evidence risks disrupting a working route without addressing a DNS-specific failure.

Question 7

New Multiple answers

Topic: Module 2

Skill tested: Uses routing-table and interface inspection commands to isolate a host connectivity fault.

A Linux server on a private subnet cannot reach any external destination after a network change. The administrator must diagnose the host locally before escalating to the network team. The server must remain online, so restarting networking or changing addresses before evidence is collected is not acceptable. Which two commands provide the most directly relevant initial information about the active interface configuration and kernel routes? Select TWO.

Correct Answer: C. `ip addr show`; E. `ip route show`
Explanation:

`ip addr show` displays interface state and assigned addresses; `ip route show` displays the kernel's routing table, including any default route. Together they provide essential local evidence for a host that cannot reach external networks without altering service state. Loopback ping only checks the local TCP/IP loopback path, not the external interface or routing. `wall` is a messaging command, and `gzip -t` checks compressed-file integrity rather than network configuration. Active tests can follow after these non-disruptive observations.

Question 8

New Single answer

Topic: Module 3

Skill tested: Selects a backup utility and verification workflow that preserves filesystem content and metadata.

A service owner needs a full backup of a directory tree to removable storage. The backup must retain permissions, ownership, timestamps, and symbolic links, and the source tree must remain unchanged. The restore team also needs a simple way to list archived members before a recovery. The source and destination are mounted filesystems, and the operator has sufficient privileges to preserve ownership. Which approach is most suitable?

Correct Answer: A. Use `tar -cpf backup.tar directory`, then use `tar -tf backup.tar` to inspect members.
Explanation:

A tar archive is designed to package directory trees and can preserve filesystem metadata and symbolic links; `-p` requests preservation of permissions when creating the archive, and privileged extraction can restore ownership. `tar -t` lists archive members before recovery. A recursive copy does not create a self-contained archive and may not preserve all requested properties unless carefully configured. `dd` operates on byte streams or block devices, not directory trees as such. Moving the source risks removing the live data and is not a backup.

Question 9

New Multiple answers

Topic: Module 3

Skill tested: Builds a pipe-based log filter that matches patterns and counts unique source addresses.

An incident responder must summarize a web-server access log without modifying the original. Each matching record contains the literal text ` 503 `, and the client address is the first whitespace-delimited field. The responder wants a frequency count for each address among those records, with the most frequent addresses first. The log is small enough for ordinary command-line processing, and the relevant fields do not contain embedded whitespace. Which two command pipelines meet the requirements? Select TWO.

Correct Answer: B. `grep ' 503 ' access.log | awk '{print $1}' | sort | uniq -c | sort -nr` with the output redirected to a new report file; C. `grep ' 503 ' access.log | awk '{print $1}' | sort | uniq -c | sort -nr`
Explanation:

The pipeline first selects records containing the literal status field, extracts the first field, sorts addresses so identical values are adjacent, counts them with `uniq -c`, and sorts numerically in descending order. Redirecting the final output to a separate report file, as in D, preserves the original log and produces the same frequency summary. `grep -v` selects nonmatching records. `sort -u` removes duplicates before counting, and the final pipeline prints counts without retaining the address field as a useful report.

Question 10

New Single answer

Topic: Module 3

Skill tested: Manages foreground and background jobs without terminating required long-running work.

An administrator starts a long-running report command in an interactive shell and realizes that the command will take several hours. It is currently running in the foreground, and the administrator wants to regain the shell prompt while allowing the job to continue. The process must not be terminated, and no separate terminal or scheduler is available. Which sequence is appropriate?

Correct Answer: B. Press Ctrl-Z to suspend it, then run `bg` to continue it in the background.
Explanation:

Ctrl-Z sends the foreground job a suspend signal, returning control to the shell without terminating the process. The `bg` builtin resumes the suspended job in the background, allowing the shell prompt to be used. Ctrl-C normally interrupts the command, so `bg` cannot revive a terminated process. Closing a terminal can cause its shell's jobs to receive hangup behavior, so it is not a safe substitute. `kill -STOP` requires a target process identifier and does not itself place a shell job under normal job control.

Question 11

New Single answer

Topic: Module 3

Skill tested: Uses vi command mode and write-quit commands to make a controlled file edit.

A release operator must update one configuration line in a text file using `vi` on a remote console. The editor is currently in insert mode after the operator changed the line, and the operator must save the file and exit cleanly. The operator must not accidentally append command text to the file or discard the edit. Which keystroke sequence should be used?

Correct Answer: A. Press Esc, type `:wq`, and press Enter.
Explanation:

Pressing Esc returns `vi` to command mode. Entering `:wq` and pressing Enter writes the modified buffer and quits. In insert mode, the colon sequence would be inserted into the file rather than interpreted as an editor command. `:q!` discards changes, while `:q` cannot cleanly exit a modified buffer without saving or explicitly abandoning the changes. The selected sequence preserves the update and exits the editor.

Question 12

New Multiple answers

Topic: Module 3

Skill tested: Selects safe disk inspection commands before making changes to mounted storage.

A storage engineer is investigating whether a Linux host has enough free space for an application deployment. The engineer must inspect filesystem capacity and identify which block devices and partitions are mounted, but must not change partition tables, filesystems, or data. The host uses standard Linux disk utilities. Which two commands are appropriate for this read-only assessment? Select TWO.

Correct Answer: B. `df -h`; D. `mount`
Explanation:

`df -h` reports filesystem capacity and available space in readable units. `mount` with no arguments lists mounted filesystems and their mount points, helping identify which storage is in use. `mkfs.ext4` creates a filesystem and can destroy existing data; `dd` writing zeros overwrites the target device. `fsck -y` can make filesystem repairs automatically and is not an appropriate first step for a read-only capacity and mount inventory. The two selected commands gather the requested information without intentionally modifying storage.

Question 13

New Single answer

Topic: Module 2

Skill tested: Uses grep pattern selection to locate matching configuration lines without altering source files.

A systems administrator is reviewing a large text configuration file for active lines that set a proxy endpoint. Comments begin with `#`, and the setting name is `proxy_url`. The audit must show matching line numbers, exclude commented-out examples, and leave the file untouched. Which command best meets the request?

Correct Answer: B. `grep -n '^[[:space:]]*proxy_url' config.conf`
Explanation:

The anchored pattern allows optional leading whitespace and then requires `proxy_url` at the start of the active line, while `-n` displays line numbers. This excludes lines where the first non-whitespace character is `#` and avoids matching unrelated text containing the token later in a line. The unanchored grep in A can include comments and incidental mentions. Redirecting output back to the input file in B risks truncating it, and the in-place sed command deletes matching lines rather than auditing them.

Question 14

New Multiple answers

Topic: Module 1

Skill tested: Evaluates installation media and partition preparation against boot and data-preservation requirements.

A field technician must install Linux on a replacement workstation that has no optical drive. The machine can boot from USB, and the required installation image has been verified. The workstation contains a data partition that must be retained, while the operating-system partition is to be replaced. Which two actions are appropriate before starting the installation? Select TWO.

Correct Answer: B. Write the verified installation image to a bootable USB device and select USB boot in firmware.; E. Identify the existing data partition and ensure the installer is configured not to format it.
Explanation:

Booting from a properly prepared USB device fits the workstation's available installation path; simply storing an image as an ordinary file on the root filesystem does not make it firmware-bootable. The existing data partition must be identified and explicitly protected from formatting during partitioning. Formatting all partitions would destroy the data, while deleting and recreating the partition table entry without a backup introduces needless risk and does not preserve the data. The operating-system partition can be replaced as required, but data preservation depends on careful partition selection and backups.