LPI Linux Essentials study materials
LPI Linux Essentials study resources

LPI Linux Essentials flashcards

LPI Linux Essentials · 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.

Four freedoms
FSF definition of free software: run the program for any purpose, study and modify it, redistribute copies, and publish modified versions. Source code access is required for the last two.
Copyleft
A licensing rule, exemplified by the GPL, that requires anyone distributing a modified version to license the derivative under the same terms, keeping the software free downstream.
Permissive license
A license such as MIT or BSD that allows reuse, modification and redistribution, including in proprietary products, provided copyright notices are retained. Apache 2.0 adds a patent grant.
Kernel versus shell
The kernel manages hardware and provides system calls; the shell is an ordinary user-space program that reads commands and launches other programs. They are separate layers.
Distribution
A packaged collection of the Linux kernel, system libraries, a package manager, userland utilities and default configuration, maintained as an installable and updatable whole.
Filesystem Hierarchy Standard
The convention that places configuration in /etc, variable data in /var, read-only userland in /usr, user homes in /home, and temporary files in /tmp.
GPL version 3 changes
Compared with GPLv2, version 3 adds an express patent grant, forbids tivoization through installation information requirements, and is compatible with Apache 2.0.
Single versus double quotes
Single quotes preserve all characters literally. Double quotes still expand variables, command substitution and backslash escapes, so use them when expansion is intended.
Exit status
Every command returns an integer; zero means success and nonzero means failure. The shell stores the last foreground status in the variable $?.
Output redirection operators
Greater-than truncates and writes a file, double greater-than appends, 2> redirects stderr, and &> sends both stdout and stderr to the same destination.
Shell glob characters
Asterisk matches any string, question mark matches exactly one character, and square brackets match one character from a set. Globs are expanded by the shell before execution.
find versus locate
find walks the live filesystem and filters by name, type, size or modification time. locate queries a prebuilt database and is faster but can be stale.
chmod symbolic mode
Letters u, g and o select user, group and other; plus adds, minus removes, and equals sets permissions. For example chmod g-w removes group write access.
Absolute versus relative path
An absolute path begins at the root directory with a slash. A relative path is resolved from the current working directory, where dot is here and dot-dot is the parent.
File descriptors
Small integers identifying open streams: 0 is standard input, 1 is standard output, and 2 is standard error. Redirection and pipes operate on these descriptors.
grep useful options
Dash i ignores case, dash v inverts the match, dash c counts matching lines, dash n prints line numbers, dash r recurses directories, and dash E enables extended regular expressions.
sed substitution command
The form s/old/new/ replaces the first match on each line; adding the g flag replaces every match; dash i edits the file in place; dash n with p prints only changed lines.
awk fields and variables
awk splits each record into fields $1 through $NF using the field separator. NR counts records, NF counts fields, and patterns select which records an action applies to.
sort and uniq
sort orders lines, with dash n for numeric and dash k for key selection. uniq removes only adjacent duplicates, so input must be sorted first; dash c prefixes counts.
cut command limits
cut extracts fields by delimiter with dash d and dash f, or character positions with dash c. It cannot reorder fields or collapse repeated delimiters the way awk can.
Regular expression anchors
A caret anchors the pattern to the start of a line and a dollar sign to the end. A dot matches any single character, and asterisk repeats the preceding element zero or more times.
Pipeline construction
A pipe connects the standard output of one command to the standard input of the next, allowing small filters to be combined into a multi-stage data transformation.
Root account
The superuser has UID 0 and bypasses normal permission checks. Administrators normally use sudo for individual commands rather than logging in as root directly.
Account database files
The file /etc/passwd lists accounts with UID, GID, home and shell. Password hashes are stored in /etc/shadow, which only root can read. Groups are in /etc/group.
SIGTERM versus SIGKILL
SIGTERM, signal 15, requests graceful termination and can be caught or ignored. SIGKILL, signal 9, cannot be caught and terminates immediately without cleanup.
systemctl enable versus start
start launches a unit now, while enable creates the symlinks that start it at boot. A unit can be running without being enabled, or enabled without running.
df versus du
df reports free and used space per mounted filesystem, read from filesystem metadata. du sums apparent file sizes under a path and can differ due to sparse files and hard links.
cron time fields
A crontab line holds five fields for minute, hour, day of month, month and day of week, followed by the command. System crontabs add a user field before the command.
Numeric permission mode
Read is 4, write is 2 and execute is 1, summed per owner, group and other. Mode 755 gives rwx to owner and r-x to group and other; 644 gives rw-r--r--.
umask calculation
The umask is subtracted from the base mode: 666 for files and 777 for directories. A umask of 022 therefore produces 644 files and 755 directories.
Sticky bit on directories
The sticky bit, mode 1000, on a shared directory such as /tmp lets users delete only their own files even though the directory is world-writable.
Directory permission meaning
On a directory, read permits listing names, execute permits entering and accessing entries, and write permits creating or deleting entries. Execute is required for any access.