Docsity

LPIC-1 Exam 2026: Linux System Administration Certification Practice Test — System Archit, Exams of Nursing

Toggle sidebar
bg1
LPIC-1 Exam 2026: Linux System Administration Certification
Practice Test — System Architecture, Package Management, Linux
Commands, Filesystems, Shell Scripting & System Services — 190
Multiple-Choice Questions with Answers & Detailed Rationales
SECTION 1: SYSTEM ARCHITECTURE
(Ques ions 1–28)
t
Ques on 1ti
A technician needs to determine whether a system uses BIOS or UEFI firmware before
installing a new bootloader. Which directory provides this information on a modern Linux
system?
A. /sys/firmware/efi
B. /proc/bootloader
C. /etc/firmware
D. /dev/bios
Correct Answer: A
Explana on:ti The presence of /sys/firmware/efi indicates UEFI firmware; its absence
suggests BIOS. This virtual filesystem exposes firmware interfaces to userspace.
Ques on 2ti
During system boot, the kernel decompresses itself and initializes hardware. Which
component is loaded immediately after the kernel to prepare the root filesystem?
A. GRUB stage 2
B. initramfs
C. systemd
D. BIOS
Correct Answer: B
Explana on:ti The initramfs (initial RAM filesystem) loads drivers and modules needed to
mount the real root filesystem before transitioning control to init.
Ques on 3ti
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Partial preview of the text

Download LPIC-1 Exam 2026: Linux System Administration Certification Practice Test — System Archit and more Exams Nursing in PDF only on Docsity!

LPIC-1 Exam 2026: Linux System Administration Certification Practice Test — System Architecture, Package Management, Linux Commands, Filesystems, Shell Scripting & System Services — 190 Multiple-Choice Questions with Answers & Detailed Rationales SECTION 1: SYSTEM ARCHITECTURE

(Ques ions 1–28) t

Ques on 1 ti A technician needs to determine whether a system uses BIOS or UEFI firmware before installing a new bootloader. Which directory provides this information on a modern Linux system? A. /sys/firmware/efi B. /proc/bootloader C. /etc/firmware D. /dev/bios Correct Answer: A Explana on: ti The presence of /sys/firmware/efi indicates UEFI firmware; its absence suggests BIOS. This virtual filesystem exposes firmware interfaces to userspace. Ques on 2 ti During system boot, the kernel decompresses itself and initializes hardware. Which component is loaded immediately after the kernel to prepare the root filesystem? A. GRUB stage 2 B. initramfs C. systemd D. BIOS Correct Answer: B Explana on: ti The initramfs (initial RAM filesystem) loads drivers and modules needed to mount the real root filesystem before transitioning control to init. Ques on 3 ti

An administrator needs to modify kernel parameters at boot time without permanently editing configuration files. Which key should be pressed during GRUB 2 to access the editing interface? A. Tab B. Shift C. E D. C Correct Answer: C Explana on: ti Pressing E in GRUB 2 opens the boot entry editor, allowing temporary kernel parameter modifications before booting. Ques on 4 ti A system fails to boot because the root filesystem is corrupted. The administrator needs to enter single-user mode. Which kernel parameter accomplishes this when added at the GRUB prompt? A. single B. recovery C. init=/bin/bash D. emergency Correct Answer: A Explana on: ti The single kernel parameter (or 1) instructs init to enter single-user mode, mounting filesystems read-only for repair. Ques on 5 ti Which command displays the current runlevel on a SysVinit system? A. runlevel B. systemctl get-default C. init --status D. level Correct Answer: A Explana on: ti The runlevel command outputs the previous and current runlevels, such as "N 3" for no previous and current runlevel 3. Ques on 6 ti A Linux server needs to boot into a graphical environment by default. Which systemd target should be set as the default?

current boot session; it is a virtual file. Ques on 10 ti A server needs to be shut down at a specific time with a warning message sent to all loggedin users. Which command accomplishes this? A. shutdown -h +30 "System maintenance" B. halt -t 30 C. poweroff --delay 30 D. reboot --message "Maintenance" Correct Answer: A Explana on: ti shutdown -h +30 schedules a halt in 30 minutes; the message is broadcast to all terminal sessions before shutdown. Ques on 11 ti Which component of the Linux boot process is responsible for loading the kernel into memory? A. initrd B. Bootloader C. init D. udev Correct Answer: B Explana on: ti The bootloader (GRUB, LILO, etc.) locates and loads the kernel image and initramfs from disk into memory. Ques on 12 ti An administrator needs to view kernel ring buffer messages to diagnose a hardware detection issue during boot. Which command displays these messages? A. dmesg B. journalctl --boot C. cat /var/log/messages D. tail -f /var/log/syslog Correct Answer: A Explana on: ti The dmesg command reads the kernel ring buffer, showing hardware detection, driver loading, and boot-time kernel messages.

Ques on 13 ti What is the function of the systemctl isolate rescue.target command? A. Sets rescue.target as the permanent default B. Switches immediately to rescue mode C. Lists all units in rescue.target D. Prevents rescue.target from starting Correct Answer: B Explana on: ti isolate stops all units not required by the specified target and starts the target's units, effectively changing the running system state immediately. Ques on 14 ti A system administrator needs to know which systemd unit files are currently loaded and active. Which command provides this information? A. systemctl list-units B. systemctl status C. systemctl show D. systemctl dump Correct Answer: A Explana on: ti systemctl list-units displays all loaded and active units along with their load state, active state, and description. Ques on 15 ti Which file defines the default runlevel on a SysVinit-based Linux system? A. /etc/inittab B. /etc/runlevel.conf C. /etc/default/init D. /etc/sysconfig/init Correct Answer: A Explana on: ti /etc/inittab contains the initdefault entry that specifies the runlevel the system enters after boot on SysVinit systems. Ques on 16 ti A server with UEFI firmware requires a specific partition to store bootloader files. What filesystem type must this partition use?

C. Missing initramfs D. GRUB corruption Correct Answer: B Explana on: ti When fsck detects filesystem errors requiring manual intervention, the boot process pauses and prompts for the root password to enter maintenance mode. Ques on 20 ti What is the primary difference between halt and poweroff commands? A. halt sends ACPI shutdown signal; poweroff does not B. poweroff sends ACPI shutdown signal; halt does not C. halt terminates all processes; poweroff does not D. They are identical on all systems Correct Answer: B Explana on: ti poweroff sends an ACPI signal to cut power after halting the system, while halt stops the CPU without powering down the hardware. Ques on 21 ti Which directory contains systemd unit files installed by the distribution's package manager? A. /etc/systemd/system B. /run/systemd/system C. /lib/systemd/system D. /usr/local/systemd Correct Answer: C Explana on: ti Distribution-provided unit files reside in /lib/systemd/system (or /usr/lib/systemd/system on some distributions); local overrides go in /etc. Ques on 22 ti A system administrator needs to analyze boot performance and identify services that slow startup. Which command provides this analysis on systemd systems? A. systemd-analyze blame B. systemctl boot-time C. dmesg --timestamps D. bootchart Correct Answer: A

Explana on: ti systemd-analyze blame lists all units sorted by initialization time, helping identify services that delay the boot process. Ques on 23 ti What happens when a Linux system receives the Ctrl+Alt+Del key combination by default on modern systemd distributions? A. Immediate hard reset B. System reboot initiated by systemd C. Nothing happens D. Emergency shell activation Correct Answer: B Explana on: ti ctrl-alt-del.target is triggered, which by default initiates a clean reboot through systemd's reboot handling. Ques on 24 ti An administrator needs to modify kernel module parameters persistently. Where should the configuration be placed? A. /etc/modules.conf B. /etc/modprobe.d/ C. /boot/modules.cfg D. /lib/modules/$(uname -r)/parameters Correct Answer: B Explana on: ti Files in /etc/modprobe.d/ ending in .conf contain module options, aliases, and blacklists loaded by modprobe. Ques on 25 ti Which command displays the current systemd default target? A. systemctl get-default B. systemctl default C. systemctl show-default D. systemctl target --current Correct Answer: A Explana on: ti systemctl get-default outputs the target that systemd boots into by default, such as graphical.target or multi-user.target. Ques on 26 ti

A system administrator needs to install a Debian package and automatically resolve dependencies. Which command accomplishes this? A. dpkg -i package.deb B. apt install ./package.deb C. dpkg --install package.deb D. apt-get install package.deb Correct Answer: B Explana on: ti apt install ./package.deb uses APT's dependency resolver while installing a local .deb file, unlike raw dpkg which fails on unmet dependencies. Ques on 30 ti Which directory contains the APT package cache on a Debian system? A. /var/cache/apt/archives B. /var/lib/dpkg/info C. /etc/apt/sources.list.d D. /usr/share/doc Correct Answer: A Explana on: ti Downloaded .deb files are stored in /var/cache/apt/archives before installation; apt clean removes these cached packages. Ques on 31 ti An administrator needs to find which package provides the file /usr/bin/htop on a Debian system. Which command is appropriate? A. dpkg -S /usr/bin/htop B. apt-file search /usr/bin/htop C. dpkg -L htop D. apt-cache show htop Correct Answer: B Explana on: ti apt-file search queries package contents including uninstalled packages; dpkg - S only searches installed package databases. Ques on 32 ti Which RPM command installs a package while showing verbose progress information? A. rpm -ivh package.rpm B. rpm -U package.rpm

C. yum install package.rpm D. rpm --install package.rpm Correct Answer: A Explana on: ti -i installs, -v shows verbose output, and -h displays hash marks indicating progress during installation. Ques on 33 ti A system administrator needs to remove a package and all its unused dependencies on a Debian system. Which command accomplishes this? A. apt remove package B. apt purge package C. apt autoremove package D. apt remove --purge package Correct Answer: C Explana on: ti apt autoremove removes packages that were automatically installed to satisfy dependencies and are no longer needed. Ques on 34 ti What is the primary purpose of the zypper command? A. Debian package management B. RPM package management on SUSE C. Arch Linux package management D. Source code compilation Correct Answer: B Explana on: ti zypper is SUSE's command-line package manager for installing, updating, and removing RPM packages with dependency resolution. Ques on 35 ti An administrator needs to examine the dependencies of an installed RPM package. Which command displays this information? A. rpm -qi package B. rpm -ql package C. rpm -qR package D. rpm -qc package Correct Answer: C

An administrator needs to view detailed information about an installed Debian package including version and maintainer. Which command is appropriate? A. dpkg -l package B. apt show package C. dpkg -s package D. apt-cache show package Correct Answer: C Explana on: ti dpkg -s (or --status) displays package status, version, dependencies, maintainer, and description from the local dpkg database. Ques on 40 ti Which command lists all files installed by a specific RPM package? A. rpm -qi package B. rpm -ql package C. rpm -qf /path/to/file D. rpm -qp package.rpm Correct Answer: B Explana on: ti rpm -ql (or --query --list) shows all files included in an installed package, useful for verifying installation contents. Ques on 41 ti A system administrator needs to add a third-party repository to a Fedora system. Which directory contains repository configuration files? A. /etc/yum.repos.d/ B. /etc/apt/sources.list.d/ C. /etc/zypp/repos.d/ D. /etc/pacman.d/ Correct Answer: A Explana on: ti YUM/DNF repository configuration files are stored in /etc/yum.repos.d/ with .repo extensions. Ques on 42 ti What is a shared library on a Linux system? A. A library statically linked into each executable B. A library loaded at runtime and shared among processes

C. A library only accessible to the root user D. A kernel module Correct Answer: B Explana on: ti Shared libraries (.so files) are loaded into memory once and shared by multiple programs, reducing disk and memory usage. Ques on 43 ti Which command identifies the shared libraries an executable requires? A. ldconfig -p B. ldd /path/to/binary C. nm /path/to/binary D. objdump -d /path/to/binary Correct Answer: B Explana on: ti ldd prints the shared library dependencies of an executable, showing which libraries are needed and their resolved paths. Ques on 44 ti An administrator needs to rebuild the shared library cache after installing a new library. Which command accomplishes this? A. ldconfig B. ld.so C. ldd --update D. libtool --refresh Correct Answer: A Explana on: ti ldconfig scans library directories and rebuilds /etc/ld.so.cache, enabling the dynamic linker to locate new libraries. Ques on 45 ti Which file specifies additional directories the dynamic linker should search for shared libraries? A. /etc/ld.so.conf B. /etc/libraries.conf C. /etc/ld.conf D. /etc/linker.d/ Correct Answer: A

A. dnf list groups B. dnf group list C. dnf grouplist D. dnf list available-groups Correct Answer: B Explana on: ti dnf group list displays available and installed package groups, which bundle related packages for common use cases. Ques on 50 ti An administrator needs to query the RPM database for the package that owns /etc/ssh/sshd_config. Which command works? A. rpm -qf /etc/ssh/sshd_config B. rpm -ql /etc/ssh/sshd_config C. rpm -qi /etc/ssh/sshd_config D. rpm -qp /etc/ssh/sshd_config Correct Answer: A Explana on: ti rpm -qf (or --query --file) identifies which installed package contains a specified file. Ques on 51 ti Which option to apt-get simulates an installation without actually making changes? A. --simulate B. --dry-run C. -s D. Both A and C Correct Answer: D Explana on: ti Both apt-get -s and apt-get --simulate perform a dry run, showing what would happen without modifying the system. Ques on 52 ti What is the purpose of the dpkg --configure -a command? A. Configure all unpacked but unconfigured packages B. Reinstall all packages C. Verify package dependencies D. Remove all configuration files

Correct Answer: A Explana on: ti After an interrupted installation, dpkg --configure -a completes configuration of all packages that were unpacked but not fully configured. Ques on 53 ti Which file type does the alien utility convert between? A. Source code archives B. Different package formats (RPM, DEB, etc.) C. Disk images D. Kernel modules Correct Answer: B Explana on: ti alien converts between package formats, such as RPM to DEB or vice versa, though native packages are generally preferred. Ques on 54 ti A system administrator needs to install a kernel module from source. Which directory typically contains the build configuration for the running kernel? A. /usr/src/linux-headers-(uname−r)B./lib/modules/( uname − r ) B ./ lib / modules /(uname - r)/build C. /boot/kernel-config D. /etc/kernel/headers Correct Answer: B Explana on: ti /lib/modules/$(uname -r)/build is a symbolic link to the kernel headers and build configuration for compiling modules. Ques on 55 ti Which command removes a package and its configuration files on a Debian system? A. apt remove package B. apt purge package C. dpkg -r package D. dpkg -x package Correct Answer: B Explana on: ti apt purge (or apt remove --purge) removes both the package and its system- wide configuration files, unlike remove. Ques on 56 ti

A. sed 's/old/new/g' input.txt > output.txt B. replace "old" "new" < input.txt > output.txt C. tr "old" "new" < input.txt > output.txt D. awk '{gsub(old,new)}' input.txt > output.txt Correct Answer: A Explana on: ti sed 's/old/new/g' performs global substitution; redirecting output creates a new file while preserving the original. Ques on 60 ti What does the cut -d: -f1 /etc/passwd command accomplish? A. Extracts the first field (username) from /etc/passwd B. Removes the first line of /etc/passwd C. Counts the number of lines in /etc/passwd D. Sorts /etc/passwd by first field Correct Answer: A Explana on: ti cut -d: sets the delimiter to colon; -f1 selects the first field, which is the username in /etc/passwd. Ques on 61 ti Which command sorts a file numerically in reverse order? A. sort -n file B. sort -r file C. sort -nr file D. sort -rn -n file Correct Answer: C Explana on: ti -n enables numeric sorting; -r reverses the order. Combined, -nr sorts numerically in descending order. Ques on 62 ti An administrator needs to count the number of lines in a file. Which command is appropriate? A. wc -l file B. wc -c file C. wc -w file D. count file Correct Answer: A

Explana on: ti wc -l counts lines; -c counts bytes, and -w counts words in the specified file. Ques on 63 ti Which command displays the first 10 lines of a file by default? A. tail file B. head file C. cat file | first D. less file Correct Answer: B Explana on: ti head without options displays the first 10 lines of a file; -n can specify a different line count. Ques on 64 ti What is the purpose of the tee command? A. Reads from stdin and writes to both stdout and files B. Splits a file into multiple parts C. Creates symbolic links D. Terminates processes Correct Answer: A Explana on: ti tee reads standard input and writes it to standard output while simultaneously writing to specified files, useful in pipelines. Ques on 65 ti Which command extracts columns from a file based on character positions? A. cut -c B. awk -F C. paste -d D. join -t Correct Answer: A Explana on: ti cut -c selects specified character positions, such as cut -c1-10 for the first ten characters of each line. Ques on 66 ti An administrator needs to find all files larger than 100MB in the current directory tree. Which command accomplishes this?