Back to cert prep

Practice area

LPIC-1 101: Installation and Package Management

Plan disk layout, inspect boot and package state, identify shared library issues, and reason about Linux guests without breaking package databases.

Linux One Liners is an independent study and practice resource. It is not affiliated with, endorsed by, or approved by LPI, The Linux Foundation, CompTIA, or any certification provider. This site does not provide exam dumps or real exam questions.

Source status

Source status: LPI LPIC-1 overview verified July 3, 2026. Current version 5.0; exams 101-500 and 102-500.

This page paraphrases study areas into command practice. It does not copy official objective text wholesale and is not an exam dump.

Plain-English goal

Practice area: installation planning, boot loaders, libraries, Debian/RPM package tools, and virtualization awareness. Exam/domain: 101-500.

read the situation

Command, output, and next step

Command anatomy

lsblk -f && findmnt -rno SOURCE,FSTYPE,TARGET / /boot /home 2>/dev/null
findmnt
show the mount that contains a target path
df
fallback filesystem capacity check when present
TARGET
the mount point being used
FSTYPE
the filesystem type
OPTIONS
read/write and behavior flags

Annotated output

TARGET SOURCE         FSTYPE OPTIONS
/      /dev/nvme0n1p2 ext4   rw,relatime
/var   /dev/nvme0n1p4 ext4   rw,relatime
/srv   tank/srv       zfs    rw,relatime

What to notice

TARGET
the mount point being used
SOURCE
the backing device or dataset
FSTYPE
filesystem type
OPTIONS
read/write and behavior flags

Safe vs unsafe move

Common wrong move

Assuming a path is on / when it is a separate mount.

Next safe command

df -hT /srv

Troubleshooting ladder

  1. Name the symptom.
  2. Inspect read-only state.
  3. Find the owner, service, file, device, mount, or route.
  4. Read the decisive output field.
  5. Choose the next narrow command.
  6. Avoid broad or destructive changes.
  7. Make the smallest justified change if required.
  8. Verify and record what changed.

How to get help

  1. Know the commandUse command --help, then man command for the full reference.
  2. Know the conceptUse apropos keyword or man -k keyword to discover command names.
  3. Maybe a shell builtinUse type command, command -V command, then help command.
  4. Service behaviorUse systemctl status service and journalctl -u service before restarting.
  5. Package ownershipUse dpkg -S, rpm -qf, or the distro package tool for the installed file.

Study plan

  1. Practice reading storage layout: disks, partitions, filesystems, swap, labels, UUIDs, mount points, and where boot files live.
  2. Review the boot loader as a recovery boundary: know what GRUB does and what evidence to collect before reinstalling it.
  3. Use package tools in inspection mode first: package status, file ownership, repositories, held packages, and simulated upgrades.
  4. Treat virtualization/cloud/container context as part of troubleshooting: cloned IDs, device names, dynamic disks, and guest tools can change assumptions.

Command labs

Run these in a lab shell or disposable machine first. The point is to explain the output, not just memorize the command.

Map disks to mounts

lsblk -f && findmnt -rno SOURCE,FSTYPE,TARGET / /boot /home 2>/dev/null

You should be able to identify root, boot, optional home, filesystem type, and labels/UUIDs.

Annotated output
TARGET SOURCE         FSTYPE OPTIONS
/      /dev/nvme0n1p2 ext4   rw,relatime
/var   /dev/nvme0n1p4 ext4   rw,relatime
/srv   tank/srv       zfs    rw,relatime

What to notice: TARGET, SOURCE, FSTYPE, OPTIONS.

Next safe command: df -hT /srv

Find the package owning a file

dpkg -S /usr/bin/ssh 2>/dev/null || rpm -qf /usr/bin/ssh

The owning package should be shown without installing or removing anything.

Annotated output
openssh-client: /usr/bin/ssh

What to notice: package, path.

Next safe command: dpkg -s openssh-client | sed -n '1,12p'

Preview Debian upgrades safely

apt list --upgradable 2>/dev/null | head -30 && apt -s upgrade | sed -n '1,80p'

Candidate upgrades and simulated package actions should be visible before real changes.

Annotated output
Usage: command [OPTION]... TARGET
Try 'command --help' for common flags.
Try 'man command' for full reference.

What to notice: Usage, --help, man.

Next safe command: command --help

command families

Commands to practice

  • lsblk
  • blkid
  • findmnt
  • grub-install
  • ldd
  • ldconfig
  • apt
  • dpkg
  • dnf
  • rpm
  • zypper

Related drills

Flashcards

Why use apt -s before upgrading?

It simulates actions so you can inspect installs, removals, holds, and conflicts first.

What question does dpkg -S or rpm -qf answer?

Which installed package owns a given file.

Why do UUIDs matter in /etc/fstab?

They are stable identifiers when device names change.

What can ldd reveal?

Which shared libraries a binary needs and whether any are missing.

Quick quiz

Check the reasoning locally in your browser. Answers are not sent anywhere.

Which command previews package changes without applying them on Debian/Ubuntu?
Show answer

Answer: apt -s upgrade

Why: The -s flag simulates package actions.

  • apt purge: That destroys or removes state before the evidence is understood.
  • dpkg --remove: That does not answer the question the output is asking you to prove first.
  • rpm -e: That does not answer the question the output is asking you to prove first.
A binary will not start because a library is missing. Which inspection command fits first?
Show answer

Answer: ldd /path/to/binary

Why: ldd shows shared library dependencies for a dynamic binary.

  • useradd app: That does not answer the question the output is asking you to prove first.
  • df -i: That does not answer the question the output is asking you to prove first.
  • journalctl --vacuum-time=1d: That does not answer the question the output is asking you to prove first.
Which command gives filesystem labels and UUIDs?
Show answer

Answer: lsblk -f

Why: lsblk -f is a safe first readout for filesystem metadata.

  • grep error: That does not answer the question the output is asking you to prove first.
  • crontab -l: That does not answer the question the output is asking you to prove first.
  • ss -ltn: That does not answer the question the output is asking you to prove first.

Self-test before moving on