LPIC-2 Linux Engineer (201-450 and 202-450) Exam-style mock test
LPIC-2 Linux Engineer (201-450 / 202-450) Practice Exams|Practice test
Full explanations
Exam format
Pass line 63%
33 USD One-time · lifetime access
Enroll →
Sample questions
Example1 · Capacity Planning, the Linux Kernel, and System Startup
A B2B SaaS company's reporting node shows high load averages, yet CPUs appear mostly idle in top. You suspect processes are blocked waiting on disk I/O during nightly batch exports. Which command most directly confirms per-device I/O wait and utilization over successive intervals?
・vmstat 1, reading the 'free' column for available memory pages
Incorrect. vmstat reports blocks in/out but its 'free' column tracks memory, not per-device I/O service time.
✓iostat -x 5, inspecting %util and await per device
Correct. iostat -x reports extended statistics including %util (device saturation) and await (average I/O wait) per device across intervals.
・uptime, comparing the 1, 5, and 15 minute load average fields
Incorrect. uptime shows load averages but gives no breakdown of what the blocked processes are waiting on.
・top, then pressing '1' to break out individual logical CPU core usage
Incorrect. top with '1' shows per-core CPU, which here is idle, and does not expose device-level I/O wait.
Explanation
iostat -x with an interval is the standard tool to attribute high load to disk I/O by exposing per-device await and utilization.
Example2 · Filesystem, Storage, and Advanced Device Administration
A SaaS platform engineer is building a new ext4 volume on /dev/sdb1 that will hold millions of small session files. They want to reserve extra inodes at creation so the volume does not run out of inodes before it runs out of space. Which command creates the filesystem with a smaller bytes-per-inode ratio?
✓mke2fs -t ext4 -i 4096 /dev/sdb1
Correct. The -i option sets the bytes-per-inode ratio; a smaller value such as 4096 allocates one inode for every 4 KiB, producing far more inodes for many small files.
・mkfs.ext4 -N auto /dev/sdb1
Incorrect. -N sets an explicit inode count, and 'auto' is not a valid argument; it does not tune the bytes-per-inode ratio as asked.
・mkfs.ext4 -b 4096 /dev/sdb1
Incorrect. -b sets the block size, which affects data layout and not the number of inodes reserved for small files.
・mkfs.ext4 -m 0 /dev/sdb1
Incorrect. -m sets the reserved-blocks percentage for the superuser, which frees space but does not change the inode count.
Explanation
Inode exhaustion on volumes full of tiny files is solved at creation time by lowering the bytes-per-inode ratio with mke2fs -i.
Example3 · Networking Configuration and Troubleshooting
On a B2B SaaS web node, the engineer must add a secondary static IPv4 address 10.20.5.11/24 to interface eth0 at runtime without disturbing the existing primary address, using the iproute2 suite. Which command accomplishes this?
・ifconfig eth0:1 10.20.5.11 netmask 255.255.255.0 up
Incorrect. ifconfig with an alias works but belongs to the deprecated net-tools suite, not the iproute2 suite the scenario requires.
✓ip addr add 10.20.5.11/24 dev eth0
Correct. ip addr add attaches an additional address to eth0 at runtime while leaving the primary address in place.
・ip link set eth0 address 10.20.5.11/24
Incorrect. ip link set dev address changes the hardware MAC address, not the assigned IP address.
・route add -host 10.20.5.11 dev eth0
Incorrect. The route command manipulates the routing table and does not assign an address to an interface.
Explanation
iproute2's 'ip addr add' is the correct way to add a secondary IP to an interface at runtime, coexisting with existing addresses.
Example4 · Domain Name Server (DNS) and Network Client Management
A healthcare services firm runs BIND on an internal server to resolve names for its clinical intranet. The administrator wants named to accept recursive queries only from the internal subnet 10.20.0.0/16 while answering authoritative data to everyone. Which directive in the options block of named.conf achieves this?
・forwarders { 10.20.0.0/16; };
Incorrect. The forwarders directive lists upstream servers to relay queries to; it does not restrict which clients may make recursive requests.
✓allow-recursion { 10.20.0.0/16; };
Correct. allow-recursion restricts recursion to the listed clients while authoritative answers remain available to all queriers, matching the requirement exactly.
・allow-transfer { 10.20.0.0/16; };
Incorrect. allow-transfer governs which hosts may perform zone transfers, not which clients may send recursive queries.
・The server must enable listen-on-v6 and add every clinical workstation address to the global allow-query access control list individually.
Incorrect. listen-on-v6 only affects IPv6 socket binding and per-host allow-query entries would also block authoritative answers to outsiders, defeating the goal.
Explanation
Recursion access is controlled by allow-recursion, which is independent of authoritative answers served to all clients.
Example5 · System Security, VPN, Email, and Web Services
A healthcare services firm must block direct SSH logins to the root account on its patient-records bastion host, while still allowing administrators to log in as themselves and escalate with sudo. Which sshd_config directive enforces this?
・AllowRootLogin restricted-sessions-only in the main sshd_config block
Incorrect. AllowRootLogin is not a valid sshd_config directive; the setting governing root access is PermitRootLogin.
✓PermitRootLogin no
Correct. PermitRootLogin no disables all direct SSH logins to the root account, forcing admins to log in as themselves and use sudo.
・Set DenyUsers root plus RootPasswordAuthentication disabled globally
Incorrect. DenyUsers root would block root but RootPasswordAuthentication is not a real directive, so this combination is invalid.
・Add root to the DenyGroups directive and then restart the daemon
Incorrect. DenyGroups filters by group membership and does not cleanly target the root account; PermitRootLogin is the correct mechanism.
Explanation
PermitRootLogin no is the standard, purpose-built sshd_config directive to prevent direct root SSH logins while leaving normal user logins and sudo escalation intact.
Example6 · Capacity Planning, the Linux Kernel, and System Startup
A healthcare services firm reports that its patient-records application server feels sluggish during morning check-in. You suspect processes are being delayed because the CPU run queue is overloaded while memory pressure stays low. Which tool gives you a continuous, updating view of the run-queue length alongside context switches and CPU breakdown so you can confirm CPU saturation?
✓vmstat 2, reading the 'r' column over successive intervals
Correct. The 'r' column of vmstat reports the number of runnable processes waiting for CPU, and repeated intervals reveal sustained run-queue overload with context-switch and CPU columns alongside.
・free -m, comparing used and available memory each minute
Incorrect. free -m only shows memory totals and would not reveal run-queue length or CPU saturation, which is the suspected problem here.
・du -sh on the application directory to measure growth
Incorrect. du measures disk space consumed by files and has nothing to do with CPU scheduling or run-queue pressure.
・lsof -p to list every open file handle held by the application process
Incorrect. lsof enumerates open files for a process but does not measure runnable-process counts or CPU contention over time.
Explanation
vmstat's 'r' column is the standard way to confirm CPU run-queue saturation across sampling intervals.
Example7 · Capacity Planning, the Linux Kernel, and System Startup
During a flash sale on the UrbanThread retail web platform, response times spike. A SysAdmin runs vmstat 1 and sees the 'si' and 'so' columns consistently showing high, nonzero values while 'wa' climbs. Which conclusion is best supported by these specific readings?
✓The system is actively swapping memory to and from disk, indicating memory pressure
Correct. In vmstat, the 'si' and 'so' columns report swap-in and swap-out activity in blocks per second; sustained nonzero values with rising 'wa' point to active swapping caused by memory pressure.
・The network interface is saturated and dropping inbound retail transaction packets
Incorrect. Network saturation is not reflected by vmstat's 'si'/'so' columns; those columns track swap activity, not packet throughput on an interface.
・The CPU is spending excessive cycles servicing hardware interrupts from the disk controller
Incorrect. Interrupt servicing appears in the 'in' column and CPU 'sy'/'hi' time, not in the 'si' and 'so' swap columns being described.
・The run queue is overloaded with processes waiting for an available CPU scheduler slot
Incorrect. Run-queue overload is shown by the 'r' column and high CPU 'us'/'sy' time, whereas 'si'/'so' specifically indicate paging to and from swap space.
Explanation
The 'si' (swap-in) and 'so' (swap-out) columns of vmstat directly measure swapping; when they are persistently nonzero alongside rising I/O wait, the system lacks sufficient RAM and is paging to disk.
Example8 · Capacity Planning, the Linux Kernel, and System Startup
The UrbanThread monitoring team needs a continuously updating, interactive view of per-process CPU and memory consumption on a busy checkout server so they can spot a runaway process as it happens. Which tool is designed for this real-time interactive monitoring?
・sar, replaying the archived performance data collected earlier by the system activity data collector
Incorrect. sar reports historical or periodically sampled statistics from stored data rather than providing a live, interactive process list that updates on screen.
✓top, which refreshes periodically and lets the operator sort processes live
Correct. top provides a live, periodically refreshing and sortable view of processes, making it ideal for catching a runaway process in real time.
・iostat, reporting averaged block device throughput since the last boot of the machine
Incorrect. iostat focuses on block device and CPU utilization averages, not an interactive per-process view that can be sorted on the fly.
・free, showing a one-time snapshot of total, used, and available physical memory
Incorrect. free prints a single static snapshot of memory usage and does not continuously update or show per-process detail.
Explanation
top is the classic interactive, self-refreshing process monitor; it lets an operator sort by CPU or memory and watch usage change moment to moment.
Example9 · Capacity Planning, the Linux Kernel, and System Startup
UrbanThread's capacity planner wants to review CPU, memory, I/O, and network statistics that were automatically sampled at regular intervals throughout the previous week to forecast upcoming Black Friday load. Which utility is purpose-built to collect and report such historical system activity?
・uptime
Incorrect. uptime only shows how long the system has run and the current load averages, with no historical interval-based reporting.
✓sar from the sysstat package
Correct. sar, part of the sysstat package, reads data periodically collected by the sadc/cron mechanism and reports historical CPU, memory, I/O, and network activity.
・lsof
Incorrect. lsof lists currently open files and the processes using them, which is unrelated to historical performance trending.
・nice
Incorrect. nice adjusts the scheduling priority of a process and does not collect or report any resource usage history.
Explanation
sar is the reporting front end of the sysstat suite, designed to present system activity collected at intervals over time, which is exactly what capacity trending requires.
Example10 · Capacity Planning, the Linux Kernel, and System Startup
A batch server at a financial services firm runs overnight settlement jobs. Operators report the system feels sluggish, yet top shows CPUs are rarely at 100% utilization and free memory is adequate. You suspect processes are blocked waiting on disk. Which tool and reported column should you examine first to confirm an I/O bottleneck?
・ps aux and the STAT column looking for the Z zombie state
Incorrect. The Z state marks defunct zombie processes, which do not indicate disk contention and would not cause general sluggishness here.
✓vmstat and the wa column showing CPU time spent waiting on I/O
Correct. vmstat reports a wa column representing the percentage of CPU time spent idle while waiting on outstanding I/O, directly confirming a disk bottleneck.
・free -m and the available column reflecting reclaimable cache
Incorrect. free -m reports memory and cache figures but does not reveal whether processes are stalled waiting for disk operations.
・uptime and the one-minute load average field at the far right
Incorrect. uptime shows load averages but cannot distinguish I/O wait from CPU demand, so it will not confirm the suspected disk bottleneck.
Explanation
A high wa value in vmstat (or iostat) is the classic signal that processes are blocked on I/O even when CPU utilization appears low, which matches the observed symptoms.
Example11 · Capacity Planning, the Linux Kernel, and System Startup
On a trading-analytics host you need a continuous, per-device view of disk throughput and service time to decide whether a storage array upgrade is justified before quarter-end. Which command produces extended device statistics refreshed every two seconds?
✓iostat -x 2
Correct. iostat -x 2 prints extended per-device statistics such as await and %util every two seconds, ideal for sizing storage.
・sar -n DEV 2
Incorrect. sar -n DEV reports network interface statistics, not disk device throughput or service times.
・mpstat -P ALL 2 reporting per-processor CPU utilization breakdowns
Incorrect. mpstat -P ALL breaks down CPU utilization per processor and gives no disk device information.
・pstree -p showing the parent and child relationships of running processes
Incorrect. pstree -p visualizes the process hierarchy and provides no performance measurement data at all.
Explanation
iostat with the -x flag is the standard tool for extended per-device disk metrics; sar -n DEV and mpstat target network and CPU respectively.
Example12 · Capacity Planning, the Linux Kernel, and System Startup
On a manufacturing distributor's order-processing server, nightly batch jobs feel sluggish. The CPU is mostly idle and RAM is free, but response times spike during the runs. Which vmstat columns should you examine first to confirm the bottleneck is disk I/O rather than CPU or memory?
✓The 'bi' and 'bo' columns together with the 'wa' column
Correct. The 'bi'/'bo' blocks-in/blocks-out columns show disk transfer activity and a high 'wa' (I/O wait) confirms the CPU is stalled waiting on disk.
・The 'us' and 'sy' columns under the cpu heading
Incorrect. The 'us' and 'sy' columns measure user and system CPU time, which you already know is low here.
・The 'si' and 'so' swap columns and the 'free' value
Incorrect. The 'si'/'so' columns and free memory indicate swapping pressure, not direct disk throughput for batch files.
・The 'r' run-queue column together with the reported load average over the last fifteen minutes
Incorrect. The run-queue and load average suggest CPU contention, which contradicts the observed idle processor on this server.
Explanation
Disk I/O bottlenecks surface in vmstat as elevated block transfer (bi/bo) combined with high I/O wait (wa), even when CPU and memory look healthy.
Example13 · Capacity Planning, the Linux Kernel, and System Startup
A warehouse-management host must be profiled continuously so the capacity team can later graph CPU, memory, disk, and network trends over a full shift. Which tool is designed to collect, store, and report this historical system-activity data?
✓The sar utility, backed by the sysstat package's data collector
Correct. sar, part of sysstat, periodically records activity and can report historical CPU, memory, disk, and network statistics.
・The uptime command run repeatedly from a cron job
Incorrect. uptime only shows load averages and gives no persistent per-subsystem history.
・The iostat command invoked once at the end of each shift
Incorrect. A single iostat snapshot captures only an instant and cannot reveal trends across the shift.
・The free command combined with a shell loop that appends to a log file each minute
Incorrect. Scraping free into a log tracks memory alone and misses CPU, disk, and network metrics.
Explanation
sar and its collector sadc (sysstat) are purpose-built for logging and later reporting long-term, multi-subsystem performance history.
Example14 · Capacity Planning, the Linux Kernel, and System Startup
A telecom operator's SMS gateway server feels sluggish during peak hours. You suspect processes are stalled waiting on disk I/O rather than being CPU-bound. Which vmstat column best confirms that processes are blocked on I/O?
✓The 'b' column under procs, which reports the number of processes in uninterruptible sleep waiting for resources
Correct. The 'b' column counts processes in uninterruptible sleep, which is the classic signature of processes blocked waiting on I/O.
・The 'r' column under procs
Incorrect. The 'r' column counts runnable processes competing for CPU, indicating CPU pressure rather than I/O blocking.
・The 'wa' column under cpu, showing the percentage of time the CPU spent idle while there was outstanding disk I/O in the system
Incorrect. The 'wa' value reports CPU time waiting on I/O, but the question asks which column confirms blocked processes; 'b' directly counts them.
・The 'si' column under swap
Incorrect. The 'si' column reports memory swapped in from disk, which relates to paging activity, not blocked process counts.
Explanation
In vmstat, the 'b' column under 'procs' counts processes in uninterruptible sleep (typically blocked on I/O), making it the direct indicator of I/O-blocked processes.
Example15 · Capacity Planning, the Linux Kernel, and System Startup
An engineer monitoring the telecom operator's billing node wants per-device disk throughput and request service times to spot a failing drive in a RAID set. Which tool is most appropriate for this task?
✓iostat -x, which reports extended per-device statistics including utilization, average request size, and await service times for each block device
Correct. iostat -x provides extended per-device metrics such as %util and await, which reveal a drive with abnormal service times.
・free -m
Incorrect. free -m reports memory and swap usage, not per-device disk throughput or service times.
・uptime to review the one, five, and fifteen minute system load averages over time
Incorrect. uptime shows aggregate load averages and gives no per-device disk detail.
・iostat with the -x flag
Incorrect. While iostat with -x is technically correct, it is a duplicate of the detailed answer; the fully described extended-statistics option is the intended choice.
Explanation
iostat -x is the standard tool for extended per-device I/O statistics, exposing utilization and service-time anomalies that point to a failing disk.
▶ Try 10 free questions (graded)