LPIC-1 102-500 study materials
LPIC-1 102-500 study resources

LPIC-1 102-500 flashcards

LPIC-1 102-500 · Build recall with a focused review session.

32 cards. Read the term and the definition here. The deck at the top of this page is optional.

$? variable
Holds the exit status of the most recently executed command. Zero indicates success; any non-zero value indicates failure, which scripts test to decide branching.
Positional parameters
$1 through $9 are the script's arguments, ${10} and higher require braces, $# is the argument count, and $0 is the script name itself.
test -z and -n
In test or [ ], -z is true when the string is empty and -n is true when it is non-empty. Numeric comparisons instead use -eq, -ne, -lt, -gt.
Single vs double quotes
Single quotes preserve every character literally. Double quotes still expand variables and command substitution but prevent word splitting and filename globbing on the result.
Here-document redirection
The <<EOF operator feeds following lines to a command's standard input until a line containing only EOF. Quoting the delimiter disables variable expansion inside the block.
case statement
A shell construct matching a value against glob patterns: case $var in a) ...;; b|c) ...;; *) ...;; esac. The first matching branch runs and execution ends at esac.
DISPLAY variable
Specifies the X11 display a client should connect to, formatted as host:display.screen. A value of :0 means the first local display on the current machine.
Wayland and XWayland
Wayland is a compositor-based display protocol replacing X11. XWayland is a compatibility layer that lets unmodified X11 applications run inside a Wayland session.
Display manager role
A graphical login program such as GDM, LightDM, SDDM, or XDM. It authenticates the user and starts the chosen desktop session listed under /usr/share/xsessions.
xrandr command
Queries and configures X11 screen outputs, resolutions, and refresh rates. It can enable or disable monitors and set positions for multi-head layouts without editing xorg.conf.
fontconfig and fc-cache
fontconfig discovers and configures fonts using /etc/fonts/fonts.conf and per-user directories. Running fc-cache rebuilds the font information cache so new fonts become available.
/etc/shadow contents
Stores per-user password hashes and aging data: login name, hash, days since epoch of last change, minimum and maximum age, warning period, and account expiry fields.
usermod -aG
Adds a user to a supplementary group while preserving existing group memberships. Omitting -a replaces all supplementary groups with the listed one, which often breaks access.
crontab five fields
A cron entry lists minute, hour, day of month, month, and day of week, then the command. System files in /etc/crontab and /etc/cron.d add a user field before the command.
systemd timer units
A .timer unit activates a matching .service unit on a schedule. OnCalendar= sets calendar-style times, and systemctl list-timers shows pending activations.
logrotate configuration
Rotates, compresses, and removes old log files based on rules in /etc/logrotate.conf and /etc/logrotate.d. Directives include rotate count, daily or weekly, and compress.
journalctl -u unit
Filters the systemd journal to entries belonging to one service unit. Related options include -b for the current boot, -f to follow, and --since for a time range.
systemctl enable
Creates the symlinks defined by a unit's [Install] section so the unit starts at boot. It does not start the unit immediately; start is a separate action.
systemctl daemon-reload
Reloads systemd's unit configuration from disk after a unit file is edited or added. Without it, systemd keeps using the previously loaded definition.
systemd targets
Targets group units for boot states. multi-user.target corresponds to old runlevel 3 (text), graphical.target to runlevel 5, and systemctl get-default reports the current default.
chronyd and chronyc
chronyd is an NTP daemon configured in /etc/chrony.conf. The chronyc command queries and controls it; chronyc sources lists configured time sources and their state.
Syslog priority levels
Ordered by severity: emerg, alert, crit, err, warning, notice, info, debug. A selector like mail.err logs that facility at err severity and all more severe levels.
Persistent journal storage
By default the journal may live only in memory. Setting Storage=persistent in journald.conf writes logs to /var/log/journal so they survive reboots.
Private IPv4 ranges
Non-routable address blocks reserved for internal use: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. They require NAT or routing to reach the internet.
ip route command
Displays or modifies the kernel routing table. The default route entry, shown as default via gateway, determines where packets without a more specific match are sent.
ss -tulpn
Lists listening sockets: -t TCP, -u UDP, -l listening only, -p owning process, -n numeric ports. It is the modern replacement for netstat.
/etc/nsswitch.conf hosts
Sets the order of name resolution sources. A line like hosts: files dns means /etc/hosts is consulted before DNS servers listed in /etc/resolv.conf.
DHCP DORA sequence
A DHCP client obtains a lease in four steps: DISCOVER broadcast, OFFER from a server, REQUEST for the offered address, and ACK confirming the lease.
umask calculation
The umask clears permission bits from defaults. With umask 022, directories become 777 minus 022 = 755 and regular files become 666 minus 022 = 644.
Setuid, setgid, sticky
Setuid runs a program as its owner; setgid on a directory makes new files inherit the group; the sticky bit on a directory lets only owners delete their files.
visudo command
Safely edits /etc/sudoers with syntax checking and file locking, preventing a broken configuration that would lock users out of sudo. A rule grants user host=(runas) commands.
ssh-copy-id
Installs a local public key into the remote account's ~/.ssh/authorized_keys, enabling key-based SSH login. The private key stays local and should be readable only by its owner.