↓ Try a sample question (with explanation)

Lpi · Practice questions

101-500 LPIC-1 Exam 101

Study 107 101-500 LPIC-1 Exam 101 practice questions with explanations. 20 of them are free to try, no sign-up needed.

Buy to unlock all questions, full reading mode and PDFs.

About this question bank

Questions
107 in total
Free to try
20 questions (no sign-up)
Exam domains
4 domains
Price
JPY 1,500 (≈ US$10; shown in your local currency at checkout) · one-time payment · 3 months
PDF
Japanese–English · Chinese–English · Korean–English · English (for buyers)
Data version
2026-11

About this exam

One of the two exams that make up LPIC-1 from the Linux Professional Institute (LPI); passing 101 and 102 within five years of each other earns LPIC-1. It covers system architecture, Linux installation and package management, GNU and Unix commands, and devices and Linux filesystems.

Try a sample question

This is an original sample question written by itmoshi based on the exam objectives.

A nightly batch job runs ./backup.sh. You want both standard output and standard error saved in the same file, out.log, with nothing shown on the screen; overwriting the file on each run is fine. Which command meets these requirements?

  1. A./backup.sh 2>&1 > out.log
  2. B./backup.sh > out.log 2>&1
  3. C./backup.sh | tee out.log
  4. D./backup.sh > out.log 2>/dev/null
Show answer and explanation

Answer:B Use ./backup.sh > out.log 2>&1.

Why it is correct

Redirections are processed left to right. First, > out.log points standard output (1) at out.log; then 2>&1 points standard error (2) at wherever standard output currently goes, which is out.log. Both streams end up in the same file and nothing reaches the screen. Because it uses >, the file is overwritten each time.

The other options

  • ✗ A The order is reversed. When 2>&1 is processed, standard output still points to its original destination (the screen, if run from a terminal), so standard error stays there; only standard output is then switched to out.log. This form is handy when you want errors to stay on the original output.
  • ✗ C A pipe carries only standard output, so errors go to stderr's original destination instead of the file, and tee writes what it receives to its own standard output as well as the file. Use it when you want to watch the output while logging it.
  • ✗ D Standard error is discarded to /dev/null, so errors are not kept in the file. Use this when errors can be ignored and only normal output should be saved.

Key takeaway

Redirections apply left to right. > file 2>&1 → both into the file. 2>&1 > file → errors stay on stdout's original destination. Pipe → only stdout is passed (use 2>&1 | or |& to pass errors too).

Try 20 questions like this for free

Most frequent topics

  1. Booting the system11 questions
  2. Using streams, pipes, and redirects9 questions
  3. Working on the command line8 questions
  4. Performing basic file management8 questions
  5. Using Debian package management6 questions
  6. Managing file permissions and ownership6 questions

Number of questions per topic among the 107 in this bank (top topics), as classified by itmoshi.

Exam domains

  1. System Architecture18 questions
  2. Linux Installation and Package Management21 questions
  3. GNU and Unix Commands48 questions
  4. Devices, Linux Filesystems, and the Filesystem Hierarchy Standard20 questions

Other Lpi exams

← All exams

itmoshi is an unofficial study service and is not affiliated with Lpi or any exam provider.