All Practice Exams

100+ Free LPIC-1 102-500 Practice Questions

Pass your LPIC-1 Linux Administrator — Exam 102 (102-500) exam on the first try — instant access, no signup required.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
Not publicly disclosed Pass Rate
100+ Questions
100% Free
1 / 100
Question 1
Score: 0/0

Which file is read first by an interactive bash login shell?

A
B
C
D
to track
2026 Statistics

Key Facts: LPIC-1 102-500 Exam

60

Exam Questions

LPI

500/800

Passing Score (scaled)

LPI

90 min

Exam Duration

LPI

$200

Exam Fee (USD)

LPI Marketplace

Pearson VUE

Delivery

Test center or OnVUE online

5 years

Validity

Recertification required

LPIC-1 Exam 102-500 has 60 questions in 90 minutes with a 500-of-800 scaled passing score. Topic weights: Shells and Shell Scripting (8), User Interfaces and Desktops (4), Administrative Tasks (12), Essential System Services (12), Networking Fundamentals (14), and Security (10). Mix of multiple-choice and fill-in-the-blank. Heavy command coverage: bash variables and conditionals, /etc/passwd and /etc/shadow, useradd/usermod, cron and systemd timers, NTP/chrony, syslog/rsyslog/journald, nmcli/ip, /etc/resolv.conf, ssh, GPG, and host firewall basics. Exam fee is $200 USD. Combined with 101-500 to earn LPIC-1, valid 5 years.

Sample LPIC-1 102-500 Practice Questions

Try these sample questions to test your LPIC-1 102-500 exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1Which file is read first by an interactive bash login shell?
A./etc/profile
B.~/.bashrc
C.~/.bash_profile
D./etc/bash.bashrc
Explanation: For login shells, /etc/profile is sourced first (system-wide), then bash looks for ~/.bash_profile, ~/.bash_login, or ~/.profile (in that order — only the first found is used). ~/.bashrc is sourced by interactive non-login shells, not login shells (though many ~/.bash_profile files explicitly source ~/.bashrc).
2Which command exports a shell variable so it is inherited by child processes?
A.export VAR=value
B.set VAR=value
C.let VAR=value
D.echo VAR=value
Explanation: export marks a variable for export to the environment of subsequently executed commands. 'VAR=value' alone (without export) creates a shell variable that is NOT inherited by children. 'set' modifies shell options. 'let' performs arithmetic.
3Which command lists all currently defined shell aliases?
A.alias
B.alias -p
C.Both A and B
D.list-aliases
Explanation: alias with no arguments lists all defined aliases. alias -p prints them in a re-runnable format ('alias name=value'). To remove an alias use 'unalias name'. To bypass an alias for a single command use a backslash: \ls.
4Inside a bash script, which special variable holds the exit status of the most recently executed command?
A.$?
B.$$
C.$!
D.$#
Explanation: $? is the exit status of the last command (0 = success, non-zero = failure). $$ is the PID of the current shell. $! is the PID of the last backgrounded command. $# is the number of positional parameters.
5Which bash test correctly checks whether the file /etc/passwd is a regular file that exists?
A.[ -f /etc/passwd ]
B.[ -e /etc/passwd ]
C.[ -d /etc/passwd ]
D.test -file /etc/passwd
Explanation: -f tests for a regular file (true if exists AND is regular). -e tests for any kind of existence (regular file, dir, symlink, etc.). -d tests if it is a directory. There is no -file flag — that's not POSIX test syntax.
6Which loop construct iterates over a list of words separated by whitespace?
A.for x in foo bar baz; do echo $x; done
B.while x in foo bar baz; do echo $x; done
C.loop x = foo bar baz
D.iterate foo bar baz
Explanation: for VAR in WORD1 WORD2 ...; do COMMANDS; done is the standard bash for loop. 'while' takes a condition, not a 'for'-style word list. 'loop' and 'iterate' are not bash keywords.
7What is the correct shebang line at the top of a bash script to ensure portability across systems?
A.#!/bin/bash
B.#!/usr/bin/env bash
C.Both A and B (env-based is more portable)
D.#bin/bash
Explanation: Both shebangs work. /bin/bash is the absolute path; #!/usr/bin/env bash searches PATH for bash, which helps when bash lives at a non-standard location (e.g., FreeBSD: /usr/local/bin/bash). The env form is more portable. The hash and bang must be the very first two characters.
8Which command captures the output of a subshell into a variable?
A.VAR=$(command)
B.VAR=`command`
C.Both A and B work; $() is preferred (nestable)
D.VAR=command
Explanation: Both backticks (legacy) and $(...) (modern POSIX) perform command substitution. $() is preferred because it can nest cleanly: $(cmd1 $(cmd2)). Backticks require escaping when nested. Plain VAR=command sets VAR to the literal string 'command'.
9Which bash arithmetic expansion returns the value of 5 + 3?
A.$((5 + 3))
B.$[5 + 3]
C.$(5+3)
D.Both A and B (B is deprecated)
Explanation: $((expr)) is the modern POSIX arithmetic expansion. $[expr] is a deprecated bash extension. $(...) is COMMAND substitution and would try to run a command named '5+3' — which fails. Always prefer $(()) for arithmetic.
10Which keyword in a bash function declaration makes a variable local to the function?
A.local
B.private
C.var
D.let
Explanation: Inside a bash function, 'local VAR=value' restricts VAR's scope to the function (and its children). Without 'local', the variable becomes part of the calling scope. 'private' and 'var' are not bash keywords. 'let' performs arithmetic, not declaration.

About the LPIC-1 102-500 Exam

Exam 102-500 is the second of two exams required for the LPIC-1 Linux Administrator certification. It covers shells and shell scripting, user interfaces and desktops (X11, Wayland), administrative tasks, essential system services, networking fundamentals, and host security.

Questions

60 scored questions

Time Limit

90 minutes

Passing Score

500 / 800 (scaled)

Exam Fee

$200 (Linux Professional Institute (Pearson VUE / OnVUE online proctored))

LPIC-1 102-500 Exam Content Outline

23%

Networking Fundamentals (Topic 109)

Weight 14/60 — largest topic. Fundamentals of internet protocols (TCP/IP basics, IPv4 addressing, CIDR, private ranges, IPv6 unicast/link-local); persistent network configuration (/etc/hostname, /etc/hosts, /etc/resolv.conf, /etc/nsswitch.conf, ip, ifconfig, route, nmcli, NetworkManager); basic network troubleshooting (ping, traceroute, mtr, ss, netstat, dig, host, hostname); configuring client-side DNS (resolv.conf, systemd-resolved).

20%

Administrative Tasks (Topic 107)

Weight 12/60. Managing user and group accounts (/etc/passwd, /etc/shadow, /etc/group, /etc/gshadow, useradd, userdel, usermod, groupadd, passwd, getent); automating system tasks by scheduling jobs (crontab, /etc/crontab, /etc/cron.d, /etc/cron.{hourly,daily,weekly,monthly}, anacron, at, systemd timers — OnCalendar); localisation and internationalisation (locale, LANG, LC_*, /etc/timezone, /etc/localtime, tzselect, iconv).

20%

Essential System Services (Topic 108)

Weight 12/60. Maintaining system time (date, hwclock, timedatectl, ntpd, chronyd, /etc/chrony/chrony.conf, pool/server directives); system logging (rsyslog, /etc/rsyslog.conf, facility.priority, journald, journalctl, logger); Mail Transfer Agent basics (mailq, sendmail-compatible interface, /etc/aliases, newaliases, ~/.forward, awareness of Postfix/exim/sendmail); managing printers and printing (CUPS, lpr, lpq, lprm, /etc/cups, cupsd.conf).

17%

Security (Topic 110)

Weight 10/60. Performing security administration tasks (find with -perm, suid/sgid, sudo, /etc/sudoers, visudo, ulimit, /etc/security/limits.conf, chage password aging, lastlog, who, w, last); setting up host security (/etc/hosts.allow, /etc/hosts.deny, xinetd/inetd awareness, disabling unused services, /etc/nologin); securing data with encryption (OpenSSH client/server config, ssh-keygen, ssh-agent, ~/.ssh/authorized_keys, GnuPG — gpg --gen-key, --encrypt, --decrypt, --sign).

13%

Shells and Shell Scripting (Topic 105)

Weight 8/60. Customizing and using the shell environment (/etc/profile, /etc/bash.bashrc, ~/.bash_profile, ~/.bashrc, ~/.profile, ~/.bash_logout, alias, unalias, function, export, set, unset, env, source/.); customizing or writing simple scripts (#!/bin/bash, variables, $1-$9, $@, $#, $?, if/then/else/fi, for/while/until, case, test/[ ], read, exit, command substitution $(), arithmetic $(())).

7%

User Interfaces and Desktops (Topic 106)

Weight 4/60 — smallest topic. Install and configure X11 (xorg.conf, /etc/X11/xorg.conf.d/, xrandr, xdpyinfo, xhost, DISPLAY); awareness of Wayland (compositor model, no central xorg.conf); desktops awareness (GNOME, KDE, Xfce); accessibility (sticky/slow/bounce keys, screen readers Orca, on-screen keyboard, high-contrast themes); display managers (XDM, GDM, LightDM, SDDM).

How to Pass the LPIC-1 102-500 Exam

What You Need to Know

  • Passing score: 500 / 800 (scaled)
  • Exam length: 60 questions
  • Time limit: 90 minutes
  • Exam fee: $200

Keys to Passing

  • Complete 500+ practice questions
  • Score 80%+ consistently before scheduling
  • Focus on highest-weighted sections
  • Use our AI tutor for tough concepts

LPIC-1 102-500 Study Tips from Top Performers

1Master /etc/passwd and /etc/shadow field order — username:x:UID:GID:GECOS:home:shell and username:hash:lastchange:min:max:warn:inactive:expire
2Practice every cron syntax: 'min hour dom month dow command', plus /etc/cron.{hourly,daily,weekly,monthly} and systemd OnCalendar=*-*-* HH:MM:SS
3Drill ssh-keygen, ssh-copy-id, ~/.ssh/authorized_keys, ~/.ssh/config — including ssh -i, ssh -L (local forward), ssh -R (remote forward)
4GnuPG: gpg --gen-key, --list-keys, --export, --import, --encrypt -r, --decrypt, --sign, --verify — know the workflow end-to-end
5Networking: 'ip addr', 'ip route', 'ip link' replace ifconfig/route; nmcli replaces editing /etc/sysconfig on RHEL — know both legacy and modern
6syslog facilities (auth, authpriv, cron, daemon, kern, user) and priorities (debug, info, notice, warning, err, crit, alert, emerg) — know the order
7Bash test operators: -e (exists), -f (file), -d (dir), -r/-w/-x (perms), -z (empty), == != for strings, -eq -ne -lt -gt for integers

Frequently Asked Questions

What is the LPIC-1 102-500 exam?

Exam 102-500 is Part 2 of 2 for LPIC-1. It tests shell scripting, X11/Wayland desktops, user/group/cron administration, essential services (NTP, syslog, MTA, CUPS), networking fundamentals, and host security including SSH and GnuPG. You must also pass 101-500 to earn LPIC-1.

Do I need to pass 101 before taking 102?

No — LPI does not enforce order. You can take 102-500 before 101-500 if you prefer. However, both must be passed within five years of each other to earn the LPIC-1 credential.

How is the LPIC-1 102 exam structured?

60 questions in 90 minutes — a mix of multiple-choice and fill-in-the-blank. The pass mark is 500 on a scaled 200-800 score. Fill-in items require exact command names and configuration paths (e.g., 'crontab', '/etc/passwd', '/etc/resolv.conf').

What are the largest topics on Exam 102-500?

Networking Fundamentals is the largest at weight 14, followed by Administrative Tasks (12) and Essential System Services (12), then Security (10), Shells/Scripting (8), and User Interfaces/Desktops (4). Total weight 60 across 60 questions.

How much does the LPIC-1 102-500 exam cost?

$200 USD per attempt at standard pricing. Reduced regional pricing of $165 or $132 is available. Each attempt requires its own voucher; the fee does not include a retake.

Where can I take Exam 102-500?

Pearson VUE testing centers worldwide, or remotely via LPI OnVUE online proctored. OnVUE requires a webcam, microphone, photo ID, and a clean uninterrupted room. Schedule through lpi.org or pearsonvue.com/lpi.

How long is LPIC-1 valid?

LPIC-1 is valid for 5 years from the date you pass the second of the two exams. Recertify by re-passing the current versions of 101-500 and 102-500, or by passing an LPIC-2 exam (201-450 or 202-450) before expiration.