Courseiva

LPIC-1 Linux Installation and Package Management Practice Question

A system administrator needs to install a local Debian package file named 'myapp.deb'. Which command should be used?

⚠ Common exam trap

Many candidates confuse `dpkg` with `apt-get` or `aptitude`, assuming that any package manager can install a local file, but only `dpkg` directly handles `.deb` files without requiring a repository lookup.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

dpkg -i myapp.deb

The correct command to install a local Debian package file is `dpkg -i myapp.deb`. The `dpkg` tool is the low-level package manager for Debian-based systems that directly handles `.deb` files, and the `-i` flag triggers installation. Unlike `apt-get` or `aptitude`, `dpkg` does not resolve dependencies automatically, but it is the proper tool for installing a standalone `.deb` file from disk.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    rpm -ivh myapp.deb

    Why it's wrong here

    rpm is the Red Hat package manager and cannot read Debian's ar-based .deb format; it errors on the archive. dpkg -i is the Debian-native tool for local packages. rpm -ivh is correct on RHEL-family systems installing .rpm files, not .deb files.

  • ✗

    aptitude install myapp.deb

    Why it's wrong here

    aptitude install also queries repositories by package name, so passing 'myapp.deb' yields no matching package and the install aborts. Local .deb files are installed with dpkg -i. aptitude suits dependency-resolved installs from repositories, not standalone archives.

  • ✓

    dpkg -i myapp.deb

    Why this is correct

    dpkg is Debian's low-level package manager, and the -i flag installs a local .deb archive directly from the filesystem. It satisfies the requirement to install the specified local file without fetching from a repository, unlike apt, which resolves dependencies remotely.

  • ✗

    apt-get install myapp.deb

    Why it's wrong here

    apt-get install resolves package names from configured repositories; given a filename it treats 'myapp.deb' as a package name and fails to locate it. dpkg -i installs a local .deb directly. apt-get is correct when fetching packages from repositories, not for local files.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This LPIC-1 question is part of Courseiva's 402-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.