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

Free LPI LPIC-1 Exam 101, Part 1 of 2 101-500 Exam Questions

Last updated: · 12 practice questions with answers and explanations

Page: 1 / 20 Total 296 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: System Architecture

Skill tested: Diagnoses device discovery using PCI information and Linux hardware tools.

A Linux workstation loses access to its wired network adapter after a hardware maintenance visit. The adapter is integrated into the motherboard, and the operating system has not been reinstalled. The administrator can use a local console, but network access is unavailable. They need to establish first whether the system firmware and PCI bus still expose the adapter before investigating kernel modules or network configuration. Which action is the most appropriate first step?

Correct Answer: D. Run `lspci` and inspect the output for the Ethernet controller.
Explanation:

`lspci` reports devices discovered on the PCI bus, so it is the direct first check for an integrated PCI Ethernet controller. If the controller is missing there, firmware settings or hardware may be responsible; if present, the investigation can proceed to drivers and network configuration. `lsusb` lists USB devices, not PCI hardware. `lsmod` shows loaded modules and cannot establish whether firmware exposes the device. Network interfaces are not verified by searching `/dev` for a device node.

Question 2

New Single answer

Topic: System Architecture

Skill tested: Selects kernel boot parameters to enter a recovery target for troubleshooting.

A server was upgraded and now reaches the boot loader but fails shortly after the kernel starts. The administrator suspects a service started during normal multi-user boot is preventing maintenance. The system uses a systemd-based distribution, and the administrator can temporarily edit the kernel command line in GRUB. They must boot into a maintenance environment without making a permanent boot-loader change or starting the normal multi-user workload. Which kernel parameter is the best choice?

Correct Answer: B. `systemd.unit=rescue.target`
Explanation:

`systemd.unit=rescue.target` directs systemd to start the rescue target, providing a limited maintenance environment rather than the normal multi-user workload. The parameter can be entered temporarily in GRUB and does not permanently alter the boot configuration. `multi-user.target` and `graphical.target` start more normal services, which conflicts with the recovery goal. `init=/bin/bash` bypasses the normal init system entirely and is a more disruptive method that does not provide the expected systemd-managed rescue target.

Question 3

New Single answer

Topic: System Architecture

Skill tested: Uses systemd journal queries to isolate boot messages from the current boot.

After a kernel update, a workstation intermittently fails to initialize a storage controller during startup. The machine eventually boots, and the administrator wants to compare messages from the current boot without relying on a persistent text log file or manually reading the entire journal. The system uses systemd and retains journal data for the current session. Which command best retrieves kernel messages from the current boot for focused diagnosis?

Correct Answer: A. `journalctl -k -b`
Explanation:

`journalctl -k -b` selects kernel messages (`-k`) from the current boot (`-b`), matching the need to inspect controller initialization messages without dumping unrelated entries. `--list-boots` lists available boots but does not show their messages. `dmesg --clear` clears the kernel ring buffer rather than retrieving a focused journal view. Filtering for a named service unit is unsuitable when the relevant messages may be emitted by the kernel and no such service unit is specified.

Question 4

New Single answer

Topic: System Architecture

Skill tested: Differentiates running processes from configured services when analyzing shutdown state.

A small office server is being decommissioned for a scheduled maintenance window. The administrator has stopped a background service and needs to confirm that the service is no longer active before powering the host down. The service is managed by systemd, but its unit file remains installed and enabled for future boots. Which command most directly verifies its current runtime state without changing its configuration?

Correct Answer: A. `systemctl status example.service`
Explanation:

`systemctl status example.service` reports the unit's current state and recent status details without modifying whether it is enabled at boot. Disabling a unit changes its boot-time configuration, but does not serve as a direct verification of current activity. Enabling it would move in the opposite configuration direction. `daemon-reload` makes systemd reread unit files and neither verifies nor stops the running service.

Question 5

New Single answer

Topic: Linux Installation and Package Management

Skill tested: Plans mount points and swap placement to isolate growth-prone data.

A company is preparing a Linux file server with a modest root volume, rapidly growing user data, and logs that must not consume the space needed to boot and administer the system. The hardware also provides enough capacity for swap. The administrator wants failures caused by log or user-data growth to be less likely to fill the root filesystem, while avoiding an unnecessarily fragmented layout. Which plan best meets these requirements?

Correct Answer: A. Place both `/home` and `/var` on separate filesystems and configure a swap area.
Explanation:

Separating both `/home` and `/var` prevents growth in user data or logs from directly exhausting the root filesystem, while a swap area provides the planned swap capacity. This layout is justified by the stated growth and isolation requirements, even though it uses more mount points. Keeping either growth-prone directory on `/` leaves a stated risk unresolved. Omitting swap solely because RAM is ample does not satisfy the scenario's requirement to provide swap.

Question 6

New Single answer

Topic: Linux Installation and Package Management

Skill tested: Chooses an appropriate boot manager for a system requiring flexible boot entries.

An administrator is installing Linux alongside an existing operating system on a workstation. Users must be able to choose either system at startup, and future kernel updates should not require manually rewriting boot-loader configuration each time. The installation uses a distribution that supports GRUB 2, and the machine's firmware can boot the selected installation disk. Which approach is the most suitable?

Correct Answer: D. Install GRUB 2 and configure entries for both operating systems, allowing the distribution's update tools to maintain Linux kernel entries.
Explanation:

GRUB 2 supports a boot menu with entries for multiple operating systems, and supported distribution tooling can maintain Linux kernel entries as kernels are updated. This meets the dual-boot and maintenance requirements. GRUB Legacy is an older alternative and manual kernel handling is unnecessarily error-prone. The kernel's `init` process starts after the boot loader and cannot provide the pre-boot operating-system menu. LILO can boot systems, but the described configuration and repeated manual maintenance are inferior to the supported GRUB 2 approach.

Question 7

New Single answer

Topic: GNU and Unix Commands

Skill tested: Applies shell quoting to preserve a variable value containing spaces.

A support engineer is preparing a Bash command that passes a user's home directory path to a utility. The path is stored in `TARGET` and can contain spaces. The utility expects the complete path as one argument, and the engineer does not want wildcard expansion or word splitting to alter it. Which command-line form correctly preserves the variable's value as a single argument?

Correct Answer: C. `utility "$TARGET"`
Explanation:

Double quotes allow Bash to expand `$TARGET` while preventing word splitting and pathname expansion, so the utility receives the complete path as one argument. Without quotes, a value containing spaces can become multiple arguments, and wildcard characters can expand. Single quotes prevent variable expansion, passing the literal text `$TARGET`. Escaping the dollar sign likewise prevents expansion, so the utility receives a literal variable reference rather than the stored path.

Question 8

New Multiple answers

Topic: GNU and Unix Commands

Skill tested: Combines text filters to select records and extract a field from a delimited stream.

A team receives a pipe-delimited inventory file with fields `asset|owner|state|site`. They need a one-line pipeline that prints only the asset identifiers for records whose state field is exactly `active`. Input order must be retained, and the solution must not modify the source file. Select TWO commands that can correctly perform the filtering and field extraction when composed in a pipeline.

Correct Answer: C. `cut -d '|' -f 1`; E. `grep -E '^[^|]*\|[^|]*\|active\|' inventory.txt`
Explanation:

The `grep` expression selects lines whose third pipe-delimited field is exactly `active`; piping those lines to `cut -d '|' -f 1` prints the asset identifier while preserving input order and leaving the file unchanged. The `sed` expression extracts the fourth field (site), not the requested first field. `sort -u` would alter order and does not filter by state or extract a field. `tr` replaces delimiters but does not select records or isolate the required identifier.

Question 9

New Multiple answers

Topic: GNU and Unix Commands

Skill tested: Uses find predicates and actions to locate files by owner and change permissions.

During a controlled cleanup, an administrator must locate regular files owned by a retired account beneath `/srv/projects` and remove the owner's write permission from those files. Directories must not be changed, and files belonging to other users must remain untouched. The account name is `oldstaff`. Select TWO elements that, combined in a suitable `find` command, meet these constraints.

Correct Answer: B. Use `-user oldstaff` to match files owned by the account.; D. Use `-type f` to restrict matches to regular files.
Explanation:

The required `find` command must use `-type f` to exclude directories and `-user oldstaff` to restrict matches to the retired account. Together, these predicates identify the intended regular files beneath the specified starting directory. `-perm -u=w` can filter for owner-writable files, but is not one of the two essential elements asked for and is unnecessary for clearing the bit. `chmod u-w` would be the appropriate modification action, whereas `-delete` would remove files rather than adjust permissions.

Question 10

New Single answer

Topic: Devices, Linux Filesystems, Filesystem Hierarchy Standard

Skill tested: Creates an ext4 filesystem and mounts it persistently by UUID.

A technician has prepared an empty partition, `/dev/sdb2`, for a Linux application data volume. The partition should use ext4, survive reboot, and be mounted at `/srv/appdata`. The system may enumerate disks in a different order after hardware changes, so the persistent mount configuration should not depend on the `/dev/sdX` name. Which sequence is the best approach?

Correct Answer: D. Run `mkfs.ext4 /dev/sdb2`, obtain its UUID with `blkid`, add a UUID-based entry for `/srv/appdata` to `/etc/fstab`, create the mount point, and test with `mount -a`.
Explanation:

The sequence creates the requested ext4 filesystem, uses its UUID for stable identification, defines the mount point in `/etc/fstab`, creates that directory, and checks the entry with `mount -a`. This avoids dependence on a changeable device enumeration name and verifies the configuration before reboot. `mkswap` creates swap, not a mounted data filesystem. An fstab device entry still needs a mount point, and mounting does not create the missing directory automatically.

Question 11

New Single answer

Topic: Devices, Linux Filesystems, Filesystem Hierarchy Standard

Skill tested: Selects filesystem integrity tools appropriate to filesystem type and mount state.

A system administrator receives an alert that an ext4 filesystem may have metadata inconsistencies after an unclean shutdown. The filesystem is mounted as `/data` and is actively serving users. The administrator wants to check and repair it safely during the next maintenance window. Which plan is most appropriate?

Correct Answer: C. Schedule downtime, unmount `/data`, then run the appropriate ext4 check on its underlying block device.
Explanation:

Filesystem checks and repairs should be performed on an unmounted filesystem to avoid conflicting changes while it is in use. During the maintenance window, the administrator should unmount `/data` and run the appropriate ext4 checker against the correct underlying device. Running a repair on a mounted, active filesystem risks corruption. `xfs_repair` is for XFS, not ext4, and `mkfs.ext4` creates a new filesystem, destroying existing data rather than repairing it.

Question 12

New Single answer

Topic: Devices, Linux Filesystems, Filesystem Hierarchy Standard

Skill tested: Uses filesystem capacity and inode reports to diagnose file-creation failures.

A build host reports that applications cannot create temporary files, even though a quick inspection suggests the filesystem has substantial free space in bytes. The affected directory is on a local filesystem, and the administrator suspects a large number of small files may have exhausted available inodes. They need to check both data-block capacity and inode availability for the mounted filesystem containing `/tmp`. Which command is the best diagnostic choice?

Correct Answer: A. `df -i /tmp`
Explanation:

`df -i /tmp` reports inode usage for the filesystem containing `/tmp`, allowing the administrator to determine whether inode exhaustion explains file-creation failures despite free data blocks. `du -sh` measures directory data usage, not the filesystem's inode availability. `ls -l` displays directory entries but does not provide a filesystem-wide inode-capacity report. The shown `mount` invocation is not a valid way to query inode usage.