CertGrid CertGrid
Concepts·LPIC-1

LPIC-1 exam format and topic weights

LPIC-1 is two separate exams, 101-500 and 102-500, both required and each scored on its own. It is also the only certification on this site whose objectives name both dpkg and rpm, which is why every page here uses two machines. This guide covers the exam structure, then shows how a script - or a candidate under time pressure - works out which package family a machine belongs to before touching anything.

Start Here Guide 1 of 33 Beginner

Exam structure and topic weights are LPI's published objectives for 101-500 and 102-500, linked below. Nothing on this page is derived from this site's practice questions - a question bank is edited, and a guide that quotes one goes quietly out of date.

Both package families, because LPI names dpkg and rpm in the objectives themselves. Every output is captured on the host it belongs to.
Server NameIP AddressOSRolesCPURAMHDD
LPIC1-A01192.168.0.76Ubuntu 26.04 LTSDebian-family host - dpkg and apt, which objective 102.4 names2 Core4 GB50 GB
LPIC1-B01192.168.0.77AlmaLinux 10.2RPM-family host - rpm and dnf, which objective 102.5 names2 Core4 GB50 GB

This guide includes

Use this before booking either paper. This matters because LPIC-1 is two separate exams and both are required - and the login shell on these hosts is not bash, which a scripting paper punishes.

Before you start

  1. The two machines, and what each says about itself

    hostnamectl answers four questions at once.

    bash Example session
    hostnamectl | grep -E 'Operating System|Kernel|Architecture|Virtualization'   Virtualization: microsoft Operating System: Ubuntu 26.04 LTS           Kernel: Linux 7.0.0-30-generic     Architecture: x86-64hostnamectl | grep -E 'Operating System|Kernel|Architecture|Virtualization'      Virtualization: microsoft    Operating System: AlmaLinux 10.2 (Lavender Lion)              Kernel: Linux 6.12.0-211.7.3.el10_2.x86_64        Architecture: x86-64

    Expected resultUbuntu 26.04 LTS on kernel 7.0.0-30-generic and AlmaLinux 10.2 on 6.12.0-211.7.3.el10_2 - both x86-64, both reporting the hypervisor they run under.

    Success conditionYou can identify an unfamiliar machine in one command.

  2. The file a script actually reads

    hostnamectl is for humans. /etc/os-release is for programs.

    bash Example session
    cat /etc/os-release | grep -E '^(ID|ID_LIKE|VERSION_ID|PRETTY_NAME)='PRETTY_NAME="Ubuntu 26.04 LTS"VERSION_ID="26.04"ID=ubuntuID_LIKE=debiancat /etc/os-release | grep -E '^(ID|ID_LIKE|VERSION_ID|PRETTY_NAME)='ID="almalinux"ID_LIKE="rhel centos fedora"VERSION_ID="10.2"PRETTY_NAME="AlmaLinux 10.2 (Lavender Lion)"ls /etc/*-release; echo "--- the RPM family keeps a second, older file"/etc/almalinux-release/etc/os-release/etc/redhat-release/etc/system-release--- the RPM family keeps a second, older file

    Expected resultID=ubuntu on one; ID="almalinux" with ID_LIKE="rhel centos fedora" on the other - and the RPM host carrying a second, older redhat-release file.

    Success conditionYou know which file to test in a portable script.

  3. Which family am I on, the way a portable script asks

    Do not parse a name. Test for the tool.

    bash Example session
    if command -v apt-get >/dev/null; then echo "debian family"; elif command -v dnf >/dev/null; then echo "rpm family"; fidebian familyif command -v apt-get >/dev/null; then echo "debian family"; elif command -v dnf >/dev/null; then echo "rpm family"; firpm family

    Expected resultdebian family from one host and rpm family from the other, from the same line of shell.

    Success conditionYou can branch on package family without maintaining a list of distributions.

  4. The login shell, which a scripting paper punishes

    Check what $SHELL actually is before trusting any $BASH_VERSION example.

    zsh Example session
    echo "SHELL=$SHELL"; echo "BASH_VERSION=${BASH_VERSION:-(empty - this is not bash)}"; bash -c 'echo "under bash -c: $BASH_VERSION"'SHELL=/usr/bin/zshBASH_VERSION=(empty - this is not bash)under bash -c: 5.3.9(1)-release

    Expected resultSHELL=/usr/bin/zsh, an empty BASH_VERSION, and 5.3.9(1)-release once the same question is asked under bash -c.

    Success conditionYou will not be caught by a shell that is not the one you assumed.

Troubleshooting

Official sources