Free practice · No sign-up required

Linux Professional Institute 101-500 LPIC-1 System Administrator Exam 101, Part 1 of 2, version 5.0 free practice test

10 questions with answer explanations. Choose an answer below to begin.

Question 1 of 10

A Linux system fails to boot because of a misconfigured X server. Which key is typically pressed during the GRUB2 menu to edit the kernel line before booting?

Show hint

101.2 Boot the system

0/10 answered · Bookmark questions to review later. Focus the practice area to use keys 1–9 and Enter.

Learn by doing

Put your answers into practice

Use official documentation and hands-on labs to work through topics you missed.

Explore all study resources →

All questions and explanations

Prefer to read at your own pace? Work through each question below, then open its answer to check your reasoning. You can link directly to a question or print this reference.

  1. A Linux system fails to boot because of a misconfigured X server. Which key is typically pressed during the GRUB2 menu to edit the kernel line before booting?

    1. 'c'

    2. 'e'

    3. 'a'

    4. 'Ctrl+X'

    Show answer and explanation

    Correct answer

    • 'e'

    In GRUB2, pressing 'e' on a menu entry allows editing the boot parameters before booting, useful for troubleshooting. 'c' opens a command line, 'a' is not a standard key, and 'Ctrl+X' is used to boot with the edited parameters.

  2. A system administrator wants to start the graphical interface after boot. Which runlevel target is typically used for graphical multi-user mode on a systemd-based distribution?

    1. runlevel 1

    2. runlevel 3

    3. runlevel 5

    4. runlevel 0

    Show answer and explanation

    Correct answer

    • runlevel 5

    On systemd-based distributions, runlevel 5 corresponds to graphical.target, which starts the X Window System. Runlevel 3 is multi-user without GUI, runlevel 1 is single-user, and runlevel 0 is halt.

  3. In /etc/fstab, what does the 'pass' field (sixth column) determine?

    1. The mount options

    2. The order of filesystem checks by fsck

    3. The dump frequency

    4. Whether the filesystem is mounted at boot

    Show answer and explanation

    Correct answer

    • The order of filesystem checks by fsck

    The sixth column in /etc/fstab indicates the order for fsck. A value of 1 is for the root filesystem, 2 for others, and 0 means no check. Other fields have different purposes: the mount options column is the fourth, dump frequency is the fifth, and the 'mount at boot' is determined by the options.

  4. A user reports that they cannot execute a script set with the SUID bit. The script has permissions -rwsr-xr-x. What is the most likely reason?

    1. The SUID bit is ignored on interpreted scripts on most systems

    2. The user does not own the file

    3. The sticky bit is missing

    4. The file is not in the PATH

    Show answer and explanation

    Correct answer

    • The SUID bit is ignored on interpreted scripts on most systems

    Linux ignores the SUID and SGID bits on shell scripts for security reasons; SUID only works on binary executables. Ownership, sticky bit, or PATH are not the primary issue here.

  5. When installing a package using dpkg, you encounter an 'unmet dependencies' error. Which command is best to resolve this?

    1. apt-cache check

    2. dpkg --configure -a

    3. dpkg --fix-broken

    4. apt-get install -f

    Show answer and explanation

    Correct answer

    • apt-get install -f

    apt-get install -f (--fix-broken) attempts to correct broken dependencies. dpkg --configure -a configures unpacked packages but does not resolve dependencies. There is no dpkg --fix-broken option, and apt-cache check only checks the package cache.

  6. Which command counts the number of lines in the output of 'ls -l' that contain the word 'file'?

    1. ls -l | grep file | wc -l

    2. ls -l | wc -l | grep file

    3. grep file ls -l | wc -l

    4. wc -l | ls -l | grep file

    Show answer and explanation

    Correct answer

    • ls -l | grep file | wc -l

    The correct pipeline pipes ls -l output to grep to filter lines containing 'file', then to wc -l to count lines. Other options misuse pipes or arguments.

  7. A process with PID 1234 has several child processes. The administrator wants to terminate the process and all its children. Which approach should be used?

    1. kill -9 1234

    2. kill -15 1234

    3. killall -TERM 1234

    4. pkill -P 1234

    Show answer and explanation

    Correct answer

    • pkill -P 1234

    pkill -P 1234 kills all child processes of parent PID 1234, allowing the administrator to then kill the parent if needed. kill -9 and kill -15 only affect the specified process. killall -TERM kills processes by name, not PID.

  8. Which pseudo-filesystem provides a real-time view of running processes and kernel parameters?

    1. /dev

    2. /sys

    3. /proc

    4. /run

    Show answer and explanation

    Correct answer

    • /proc

    /proc is a virtual filesystem that exposes kernel data structures and process information. /sys provides hardware info, /dev contains device files, and /run holds runtime data.

  9. A log file contains many lines with the word 'INFO' and some with 'ERROR'. To display only lines that do not contain 'INFO', which command is correct?

    1. grep "INFO" -i logfile

    2. grep -v "INFO" logfile

    3. grep -n "ERROR" logfile

    4. grep "INFO" | grep -v "ERROR"

    Show answer and explanation

    Correct answer

    • grep -v "INFO" logfile

    grep -v inverts the match, showing lines that do not match the pattern. The other commands show lines with 'INFO', show error lines, or filter differently.

  10. Question 10

    Link to question

    An administrator downloads a file named 'backup.tar.gz' from a server. Which command extracts the contents?

    1. tar -xzf backup.tar.gz

    2. tar -czf backup.tar.gz

    3. tar -xf backup.tar.gz --gzip

    4. unzip backup.tar.gz

    Show answer and explanation

    Correct answer

    • tar -xzf backup.tar.gz

    tar -xzf extracts a gzip-compressed tar archive. -c creates, -f specifies the file. Option c would work but -z is standard. unzip is for .zip files.

Read all flashcards

Recall the answer before opening each card.

Which key in GRUB2 opens the editor for a boot entry?

Press 'e' on the menu entry to edit kernel parameters before booting.

After editing GRUB2 parameters, which keys boot with the changes?

Press Ctrl+X or F10 to boot with the modified parameters.

What runlevel target corresponds to graphical mode on systemd?

Runlevel 5 maps to graphical.target, which starts the X Window System.

What runlevel target is multi-user without GUI on systemd?

Runlevel 3 maps to multi-user.target, no graphical interface.

What does the sixth column (pass) in /etc/fstab determine?

The order for filesystem checks by fsck: 1 for root, 2 for others, 0 to skip.

What is the effect of setting the pass field to 0 in fstab?

It disables filesystem checking for that entry; fsck ignores it.

Why does a script with SUID bit set (rws) not run as its owner?

Linux ignores SUID on interpreted scripts for security; SUID works only on binary executables.

Which command fixes unmet dependencies after a dpkg install?

apt-get install -f (or apt --fix-broken) corrects broken dependencies.

What does dpkg --configure -a do?

It configures all unpacked but not yet configured packages, but does not resolve dependencies.

How do you count lines containing 'error' in a file using commands?

grep 'error' file | wc -l pipelines the filtered lines to the line-counting command.

Which command kills all child processes of PID 1234?

pkill -P 1234 kills all children of that parent process.

What is the difference between pkill -P and kill -9?

pkill -P targets children of a specific parent; kill -9 targets a single process, not its children.

Which pseudo-filesystem shows real-time process and kernel data?

/proc is a virtual filesystem with process info and kernel parameters.

Which pseudo-filesystem exposes hardware device information?

/sys provides hardware and driver details, distinct from /proc.

How do you display lines that do NOT contain 'INFO' in a log?

grep -v 'INFO' logfile inverts the match, showing only lines without 'INFO'.

What is the purpose of the -v option in grep?

It inverts the pattern matching, outputting lines that do not match the pattern.

Which tar command extracts a .tar.gz file?

tar -xzf archive.tar.gz extracts the gzip-compressed archive.

What does the -z option in tar signify?

It tells tar to filter the archive through gzip for compression or decompression.

What command would verify and repair a filesystem interactively?

fsck /dev/sda1 checks and repairs with prompts; use -y for automatic yes.

What is the role of the fifth column in /etc/fstab?

The dump field (0 or 1) indicates if the filesystem should be backed up by dump.

Active recall deck

Practice Linux Professional Institute 101-500 LPIC-1 System Administrator Exam 101, Part 1 of 2, version 5.0 with real flashcards

Read the prompt, commit to an answer, then flip the card. Move through the deck at your own pace and repeat any topic that does not come back quickly.

20 free cards

Card 1 of 20

1 reviewed this session

Connect the concepts

Your Linux Professional Institute 101-500 LPIC-1 System Administrator Exam 101, Part 1 of 2, version 5.0 study mind map

Open a branch to connect a topic with its practice questions and explanations. Use the map to choose your next review topic.

Linux Professional Institute 101-500 LPIC-1 System Administrator Exam 101, Part 1 of 2, version 5.010 questions in this practice set
101.2 Boot the system(1)
101.3 Change runlevels and shutdown or reboot system(1)
104.2 Maintain the integrity of filesystems(1)
104.5 Manage file permissions and ownership(1)
102.4 Use Debian package management(1)
103.1 Work on the command line(1)
103.5 Create, monitor, and kill processes(1)
104.1 Create partitions and filesystems(1)
103.2 Process text streams using filters(1)
103.3 Perform basic file management(1)
Exam-focused analysis

What this 101-500 practice set measures

This is an analysis of the practice bank, not a claim about the vendor's live exam blueprint. Use it to identify the knowledge, judgment, and recall patterns exercised here, then verify your coverage against the current official exam guide.

Boot Troubleshooting and Runlevels

The practice bank covers critical boot and runlevel concepts. In GRUB2, pressing 'e' allows editing kernel parameters before booting, which is essential for fixing a misconfigured X server. On systemd-based distributions, runlevel 5 maps to graphical.target, starting the GUI. Understanding these mappings between traditional runlevels and systemd targets is vital for controlling the system state. Recognizing that runlevel 3 is multi-user without GUI and runlevel 1 is single-user helps in recovery scenarios.

  • GRUB2 edit key: 'e' to modify boot parameters.
  • Systemd target for GUI: runlevel 5 / graphical.target.
  • Non-GUI multi-user: runlevel 3 / multi-user.target.
  • Single-user mode: runlevel 1 / rescue.target.

Filesystem Integrity and Permissions

The fstab 'pass' field (sixth column) determines the fsck order: 1 for root, 2 for other filesystems, 0 to skip. This ensures filesystem checks happen in the correct sequence. The SUID bit on shell scripts is ignored for security reasons; only binary executables can leverage SUID. Understanding these nuances prevents common configuration errors. The practice set also implicitly tests knowledge of mount options and dump frequency fields.

  • fstab pass field: fsck order, 1=root, 2=others, 0=no check.
  • SUID on scripts: ignored by Linux kernel; only works on binaries.
  • Sticky bit: affects directory deletion, not script execution.
  • Permissions: -rwsr-xr-x indicates SUID set, but irrelevant for scripts.

Debian Package Management and Dependencies

When dpkg reports unmet dependencies, 'apt-get install -f' (or 'apt --fix-broken') corrects them by installing missing packages or removing conflicting ones. This is a common fix after manual dpkg operations. The practice bank distinguishes this from 'dpkg --configure -a' which reconfigures unpacked packages without resolving dependencies. Understanding the Debian package management toolchain is essential for maintaining system stability.

  • Fix broken dependencies: apt-get install -f or apt --fix-broken.
  • dpkg --configure -a: configures unpacked packages only.
  • apt-cache check: validates cache, does not fix issues.
  • Always use apt after dpkg to resolve dependency chains.

Command Line, Process Management, and Text Processing

The practice set reinforces constructing command pipelines (e.g., ls -l | grep file | wc -l) to count filtered lines. For process control, 'pkill -P 1234' kills all children of a parent process, which is more precise than kill or killall. The /proc filesystem provides real-time kernel and process data, while /sys exposes hardware info. Text filtering with 'grep -v' inverts matches, showing lines without a pattern. These fundamental tools are frequently tested.

  • Pipeline counting: pipe through grep then wc -l for line counts.
  • Kill process tree: pkill -P <parent_PID> to target children.
  • Virtual filesystems: /proc for processes/kernel, /sys for devices.
  • Invert grep: grep -v pattern to exclude matching lines.
  • Archive extraction: tar -xzf for .tar.gz files; -c creates, -x extracts.

Study workflow

Turn one 101-500 attempt into a study plan

  1. 1

    Edit Kernel Parameters in GRUB2 at Boot

    When the system fails to boot due to a misconfigured X server, restart and press Shift or Esc to reach the GRUB2 menu. Highlight the desired entry and press 'e' to edit boot parameters. Navigate to the line starting with 'linux' and add or modify parameters (e.g., 'single', 'nomodeset'). Press Ctrl+X or F10 to boot with the changes.

  2. 2

    Fix Broken Dependencies with apt

    After a dpkg installation fails with unmet dependencies, run 'sudo apt-get install -f' (or 'sudo apt --fix-broken'). This command attempts to correct broken dependencies by installing missing packages or downgrading conflicting ones. It will automatically mark packages and complete the configuration. Then, resume normal installs with 'sudo apt-get install <package>'.

  3. 3

    Kill a Process and All Its Children

    To terminate a parent process (PID 1234) and all its children, first use 'pkill -P 1234' to kill all child processes. Then kill the parent process with 'kill 1234' or 'kill -15 1234'. Alternatively, use 'kill -9 1234' for forceful termination, but this does not handle children automatically. The pkill approach ensures a clean termination tree.

  4. 4

    Extract a .tar.gz Archive

    To extract the contents of 'backup.tar.gz', use 'tar -xzf backup.tar.gz'. The options: -x for extract, -z to decompress gzip, -f to specify the file. If the archive is not compressed, omit -z. For .tar.bz2 files use -j instead. Extracted files will appear in the current directory unless a path is included in the archive.

  5. 5

    Use grep -v to Exclude Lines Matching a Pattern

    To display lines from a log file that do not contain 'INFO', run 'grep -v "INFO" logfile'. The -v option inverts the match, showing only lines that do not match the pattern. This is useful for filtering out noise. Combine with other commands: 'grep -v "INFO" logfile | grep "ERROR"' shows errors while excluding info lines.

FAQ

Questions about this 101-500 practice page

Clear boundaries on what the bank covers, how to use it, and where official vendor information still matters.

Why does the SUID bit not work on shell scripts?+

Linux ignores SUID and SGID bits on interpreted scripts (like bash, perl) for security reasons. The kernel would have to trust the script's interpreter, which can be subverted easily. SUID only works on binary executables compiled from C or similar languages.

What are the exact commands to check and repair a filesystem?+

First, unmount the filesystem if possible (e.g., 'umount /dev/sda1'). Then run 'fsck /dev/sda1' to check and interactively repair. Use 'fsck -y' to auto-answer yes. The pass field in /etc/fstab determines the order of checks at boot. For the root filesystem, use a live CD or recovery mode.

How do runlevels map to systemd targets?+

Runlevel 0 maps to poweroff.target, 1 to rescue.target, 2-4 are typically multi-user.target (no GUI), 5 to graphical.target, and 6 to reboot.target. Use 'systemctl isolate graphical.target' or 'systemctl isolate multi-user.target' to switch between them.

What is the difference between /proc and /sys?+

/proc primarily provides process information and kernel parameters (e.g., /proc/cpuinfo, /proc/meminfo). /sys exposes hardware and device driver information (e.g., /sys/class, /sys/devices). Both are virtual filesystems in memory, but /proc is more process-centric while /sys is hardware-centric.

Can 'pkill -P' kill the parent process itself?+

No, pkill -P kills all child processes of the given parent PID, but not the parent. You must still kill the parent separately. This allows you to first terminate children cleanly, then handle the parent. For a complete termination, use pkill -P followed by kill on the parent.

Keep studying

Build the next review session

Browse another free bank or use the study strategy guide to turn your misses into spaced review.