LPIC-1: Linux Administrator Practice Exam
Validates ability to perform maintenance tasks on the command line, install and configure a Linux workstation, and configure basic networking.
Practice 1,463 exam-style LPIC-1 questions with full answer explanations, then take timed mock exams that score like the real thing.
What the LPIC-1 exam covers
- System Architecture291 questions
- Linux Installation and Package Management245 questions
- GNU and Unix Commands248 questions
- Devices, Linux Filesystems, FHS244 questions
- Shells and Shell Scripting239 questions
- User Interfaces and Desktops, Admin Tasks, Networking196 questions
Free LPIC-1 sample questions
A sample of 10 questions with answers and explanations. Sign up free to practice all 1,463.
-
Which command is used to display messages generated by the kernel during the boot process?
- Asyslog --kernel
- Bbootlog
- Cjournalctl --boot-messages
- DdmesgCorrect
✓ Correct answer: DThe dmesg command displays the kernel ring buffer which contains all kernel messages generated during boot, including hardware detection and driver initialization.
Why the other options are wrong- Asyslog --kernel is incorrect because syslog is for system logging, not kernel boot messages.
- Bbootlog is incorrect because bootlog is not a standard Linux command.
- CThis is the standard tool for troubleshooting boot-related issues and examining POST messages. The syslog and journalctl commands serve different purposes and do not display raw boot messages the same way.
-
You want to start a CPU-intensive batch job at a lower scheduling priority so it does not slow down interactive work. Which command launches it with a reduced priority (niceness 10)?
- Anice -n 10 ./batchjob.shCorrect
- Bnice -n -10 ./batchjob.sh
- Crenice 10 ./batchjob.sh
- Dnice --priority=10 ./batchjob.sh
✓ Correct answer: AThe nice command launches a new process with an adjusted niceness value, and -n 10 raises the niceness to +10, which lowers its scheduling priority so the CPU favors other processes. Positive nice values mean lower priority, with the range running from -20 (highest) to +19 (lowest). This is the standard way to start a background batch job politely.
Why the other options are wrong- Bnice -n -10 ./batchjob.sh is incorrect because a negative niceness of -10 raises priority, the opposite of the goal, and also requires root privileges.
- Crenice 10 ./batchjob.sh is incorrect because renice adjusts an already-running process by PID or user, not a script name, and cannot launch a new command.
- Dnice --priority=10 ./batchjob.sh is incorrect because nice has no --priority option; the adjustment is specified with -n or as -10 directly.
-
On a Debian-based system the administrator finds /usr/sbin/sendmail is provided by Postfix. Which command would queue and send a short message to a local user, with the body read from standard input?
- Amail -s "hello" user@localhostCorrect
- Bpostfix flush
- Cmailq -s user
- Dnewaliases user
✓ Correct answer: AThe mail command (from mailx/bsd-mailx) composes a message with the subject given by -s and the recipient as an argument, reading the body from standard input until EOF (Ctrl-D). It then hands the message to the local MTA (here Postfix via the sendmail interface) for delivery. This is the simplest way to send mail from the command line or a script.
Why the other options are wrong- Bpostfix flush is incorrect because it forces an attempt to deliver already-queued mail; it does not compose or accept a new message.
- Cmailq -s user is incorrect because mailq lists the contents of the mail queue and has no -s option for sending.
- Dnewaliases user is incorrect because newaliases rebuilds the aliases database from /etc/aliases and takes no recipient argument.
-
An administrator wants the shutdown command to send only a warning to all logged-in users about an upcoming maintenance, without actually halting or scheduling the system. Which option does this?
- Ashutdown -k +15 "Maintenance in 15 minutes"Correct
- Bshutdown -h +15 "Maintenance in 15 minutes"
- Cshutdown -c "Maintenance in 15 minutes"
- Dshutdown -w +15 "Maintenance in 15 minutes"
✓ Correct answer: AThe -k option puts shutdown into a 'kidding' mode: it broadcasts the warning message to all logged-in users exactly as a real shutdown would, but it never actually halts, powers off, or reboots the system. This is useful for testing notification behavior or warning users without committing to bringing the system down. The time and message arguments are still parsed so the wall text and timing look realistic.
Why the other options are wrong- Bshutdown -h +15 "Maintenance in 15 minutes" is incorrect because -h actually schedules a halt after the delay rather than only warning.
- Cshutdown -c "Maintenance in 15 minutes" is incorrect because -c cancels an already-scheduled shutdown and does not create a warning-only notice.
- Dshutdown -w +15 "Maintenance in 15 minutes" is incorrect because -w is not a valid shutdown option for warn-only behavior; that role belongs to -k.
-
An administrator installed a library into /usr/local/lib and wants programs system-wide to find it permanently. Which TWO actions, taken together, correctly register the library on a typical glibc system? (Choose TWO)
- AEnsure /usr/local/lib is listed in /etc/ld.so.conf or a file under /etc/ld.so.conf.d/Correct
- BRun ldconfig to rebuild /etc/ld.so.cacheCorrect
- CAdd /usr/local/lib to the PATH variable in /etc/environment
- DRun depmod -a to register the library with the kernel
✓ Correct answer: A, BFor a permanent, system-wide registration, the directory containing the library must be among those ldconfig scans, which means it should appear in /etc/ld.so.conf or one of the /etc/ld.so.conf.d/*.conf fragment files (on many systems /usr/local/lib is already included by a default fragment). After confirming the path is configured, running ldconfig rescans those directories, creates the soname symlinks, and rebuilds /etc/ld.so.cache so the dynamic linker resolves the library for every program. Both steps are required: configuring the path without rebuilding the cache leaves it undiscovered.
Why the other options are wrong- CAdd /usr/local/lib to the PATH variable in /etc/environment is incorrect because PATH governs where executables are searched, not shared libraries; the loader uses the library cache and configured library directories.
- DRun depmod -a to register the library with the kernel is incorrect because depmod manages kernel module dependencies, which is unrelated to user-space shared libraries.
-
In an interactive bash shell you type 'COUNT=5' on the command line. Without using export, which statement correctly describes the scope of COUNT?
- AIt is a shell variable available only in the current shell, not inherited by child processesCorrect
- BIt is an environment variable automatically inherited by every child process
- CIt is written to /etc/environment and applies to all users
- DIt is a read-only variable that cannot be changed without unset
✓ Correct answer: AAssigning a value with NAME=value creates a plain shell variable that exists only within the current shell process. It is visible to the current shell and to commands run via source or in the same shell, but it is NOT placed into the process environment, so exec'd child processes (such as scripts or external programs) do not receive it. To make it part of the environment that children inherit, you must run 'export COUNT' or assign with 'export COUNT=5'.
Why the other options are wrong- BIt is an environment variable automatically inherited by every child process is incorrect because only exported variables become part of the environment passed to children; a bare assignment does not export.
- CIt is written to /etc/environment and applies to all users is incorrect because a command-line assignment changes only the running shell's memory and never writes to any file.
- DIt is a read-only variable that cannot be changed without unset is incorrect because the variable is fully writable; read-only status requires the 'readonly' builtin or 'declare -r'.
-
A monitoring process with PID 3097 is consuming excessive CPU. The administrator wants it to first attempt a clean shutdown by catching the default termination signal. Which command sends the standard, catchable termination signal to it?
- Akill -9 3097
- Bkill -KILL 3097
- Ckill 3097Correct
- Dkill -STOP 3097
✓ Correct answer: CWith no signal specified, kill sends signal 15 (SIGTERM) by default, which politely asks the process to terminate and can be caught or handled by the process to perform cleanup such as flushing buffers and closing files. This is the recommended first attempt before resorting to a forced kill. SIGTERM is the conventional, graceful termination request.
Why the other options are wrong- Akill -9 3097 is incorrect because signal 9 (SIGKILL) cannot be caught or handled and forcibly terminates the process without allowing any cleanup, defeating the goal of a clean shutdown.
- Bkill -KILL 3097 is incorrect for the same reason, as -KILL is simply the symbolic name for signal 9.
- Dkill -STOP 3097 is incorrect because SIGSTOP only suspends (pauses) the process rather than terminating it.
-
A USB stick is to be referenced in /etc/fstab by its filesystem label rather than a device node, because the device name changes between /dev/sdb1 and /dev/sdc1 across reboots. The label of the partition is BACKUP. Which fstab first field correctly references it by label?
- ALABEL=BACKUPCorrect
- Blabel:BACKUP
- C/dev/disk/by-name/BACKUP
- DFSLABEL(BACKUP)
✓ Correct answer: AIn /etc/fstab the first field may identify a filesystem by its label using the syntax LABEL=name, where name is the filesystem label as reported by blkid or e2label. This is resolved by the mount helper and the libblkid library to the matching device at mount time, so it survives changes in the kernel's device enumeration order. The label must match exactly, and should not contain spaces unless escaped. This is one of the standard persistent identifiers alongside UUID=.
Why the other options are wrong- Blabel:BACKUP is incorrect because the correct keyword syntax uses an equals sign, LABEL=, not a colon.
- C/dev/disk/by-name/BACKUP is incorrect because there is no by-name udev directory for filesystem labels; label-based symlinks live under /dev/disk/by-label/.
- DFSLABEL(BACKUP) is incorrect because that parenthesized form is not valid fstab syntax recognized by mount or libblkid.
-
A user sets a variable in the current shell with the command COLOR=blue and then runs a child script that reads $COLOR but finds it empty. Which command in the parent shell would have made COLOR visible to the child process?
- Aexport COLORCorrect
- Bset COLOR
- Cdeclare -r COLOR
- Denv COLOR
✓ Correct answer: AThe export builtin marks an existing shell variable so that it is placed into the environment passed to child processes. Because COLOR was created as an ordinary shell variable, it is local to the current shell until exported; running export COLOR (or export COLOR=blue) flags it for inheritance. Child scripts and external programs then receive it in their environment.
Why the other options are wrong- Bset COLOR is incorrect because set with arguments manipulates positional parameters and shell options rather than exporting variables.
- Cdeclare -r COLOR is incorrect because -r only makes the variable read-only and does not export it.
- Denv COLOR is incorrect because env without an assignment and command does not export a variable; it would try to run COLOR as a command.
-
A SQL table customers has columns id, name, and city. You must delete only the rows for customers located in the city 'Reno'. Which statement performs exactly that?
- ADELETE FROM customers WHERE city = 'Reno';Correct
- BDELETE customers WHERE city = 'Reno';
- CDELETE FROM customers;
- DREMOVE FROM customers WHERE city = 'Reno';
✓ Correct answer: AThe standard SQL deletion syntax is DELETE FROM table WHERE condition; the WHERE clause restricts removal to rows where city equals 'Reno'. The string literal is enclosed in single quotes, and FROM is required after DELETE. Omitting the WHERE clause would delete every row in the table.
Why the other options are wrong- BDELETE customers WHERE city = 'Reno'; is incorrect because the FROM keyword is required between DELETE and the table name in standard SQL.
- CDELETE FROM customers; is incorrect because without a WHERE clause it removes all rows from the table, not just the Reno customers.
- DREMOVE FROM customers WHERE city = 'Reno'; is incorrect because REMOVE is not an SQL keyword; row deletion uses DELETE.
LPIC-1 practice exam FAQ
How many questions are in the LPIC-1 practice exam on CertGrid?
CertGrid has 1,463 practice questions for LPIC-1: Linux Administrator, covering 6 exam domains. The real LPIC-1 exam has about 60 questions.
What is the passing score for LPIC-1?
The LPIC-1 exam passing score is 625, and you have about 90 minutes to complete it. CertGrid scores your practice attempts the same way so you know when you are ready.
Are these official LPIC-1 exam questions?
No. CertGrid is an independent practice platform. Questions are written to mirror the style and concepts of LPIC-1: Linux Administrator, with full explanations, but they are not official or copied vendor exam items. They are original practice questions designed to help you genuinely learn the material.
Can I practice LPIC-1 for free?
Yes. You can start practicing LPIC-1: Linux Administrator for free with daily practice and sample questions. Paid plans unlock full timed exams, complete explanations, and domain analytics.