LFCS study materials
LFCS study resources

LFCS flashcards

LFCS · 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.

systemctl enable versus start
enable configures a unit to start at boot by creating dependency symlinks; start runs it immediately. Enabling a service does not start it now.
journalctl -u unit
Shows journal entries for one systemd unit. Add -b for the current boot, -f to follow new entries, and --since to limit by time; persistent logs require /var/log/journal.
systemd daemon-reload
Rereads unit files after changes. Run systemctl daemon-reload after editing or adding a unit so systemd uses the new definitions; it does not restart running services.
Cron field order
Minute, hour, day of month, month, day of week. In /etc/crontab a user field follows the five time fields; user crontab entries omit that user field.
nice and renice range
Process niceness ranges from -20 to 19. Lower values mean higher CPU priority; only root can set negative niceness, while ordinary users may increase niceness.
Default systemd target
systemctl get-default displays it; systemctl set-default multi-user.target or graphical.target changes it. The default target determines which units start at boot.
GRUB config regeneration
On Debian-based systems run update-grub; on RHEL-family systems run grub2-mkconfig -o /boot/grub2/grub.cfg. Kernel arguments are commonly set in /etc/default/grub.
ip addr show
Displays interface addresses. Use ip link set dev eth0 up to activate an interface and ip route show to inspect routes; ip replaces older ifconfig and route commands.
ss -tulpn
Lists listening TCP and UDP sockets numerically with owning processes. -t means TCP, -u UDP, -l listening, -n numeric, and -p process; root may be needed to see all processes.
/etc/resolv.conf nameserver
Lists DNS resolver IP addresses used by the system. It may be managed dynamically by NetworkManager or systemd-resolved, so manual edits can be overwritten.
Default route
The route with destination 0.0.0.0/0. Add one with ip route add default via GATEWAY; verify with ip route show or ip route get DESTINATION.
firewalld permanent rule
firewall-cmd --add-service=http --permanent writes persistent configuration; run firewall-cmd --reload to apply it. Without --permanent the rule affects only the runtime configuration.
nmcli connection modify
Changes NetworkManager connection settings. After modifying IP, gateway, or DNS values, reactivate the connection with nmcli connection up NAME to apply them.
lsblk
Lists block devices in a tree, showing disks, partitions, sizes, and mountpoints. Use lsblk -f to include filesystem type, UUID, and label information.
/etc/fstab fields
Six fields: device, mountpoint, filesystem type, options, dump flag, and fsck pass. UUID= identifiers are preferred because device names can change.
mount -a
Mounts all entries in /etc/fstab that are not mounted and not marked noauto. Use it to test fstab changes before rebooting; syntax errors can delay boot.
LVM create order
Create physical volumes with pvcreate, volume groups with vgcreate, and logical volumes with lvcreate. Use lvextend -r to grow a logical volume and its filesystem together.
mkfs.ext4
Creates an ext4 filesystem on a device or logical volume, destroying existing data there. Mount it afterward with mount /dev/DEVICE /mountpoint and add an fstab entry if persistent.
df versus du
df reports filesystem-level space usage; du -sh summarizes space used by files and directories. Use df -i to check inode exhaustion, which can occur even when blocks remain free.
grep -rin pattern
Searches recursively for a pattern, ignoring case and printing line numbers. -v inverts matches, -E enables extended regular expressions, and -l lists only matching filenames.
find -mtime -7
Selects files modified within the last seven days. Combine with -type f and -name patterns; -exec command {} \; runs a command on each match.
tar -czf
Creates a gzip-compressed tar archive. Extract with tar -xzf ARCHIVE, list contents with tar -tf ARCHIVE, and use -C DIRECTORY to choose the extraction directory.
chmod 755 meaning
Gives owner read, write, and execute; group and others read and execute. Numeric mode 644 gives owner read-write and group/others read only.
umask 022 result
For a directory, default mode 777 minus umask 022 yields 755. For a regular file, base 666 minus 022 yields 644; the umask removes permission bits.
Redirection 2>&1
Sends standard error to the same destination as standard output. Order matters: command > file 2>&1 redirects both, while 2>&1 > file redirects only stdout.
Hard link versus symlink
A hard link is another name for the same inode and cannot cross filesystems. A symbolic link stores a path to its target and can be dangling.
useradd -m -G
Creates a user with a home directory and supplemental groups. -s sets the login shell; -G adds supplemental groups, while -g sets the primary group.
usermod -aG group user
Adds a user to a supplemental group without removing existing supplemental groups. Omitting -a replaces the user's supplemental group list.
/etc/passwd fields
Seven colon-separated fields: username, password placeholder, UID, GID, GECOS comment, home directory, and login shell. Password hashes are stored in /etc/shadow.
UID 0 root
User ID zero is root with full privileges. System accounts commonly use UIDs below 1000, while regular user accounts often start at 1000, though ranges vary by distribution.
visudo
Safely edits /etc/sudoers with syntax checking and file locking. A rule like %admin ALL=(ALL:ALL) ALL grants members of the admin group full sudo privileges.
chage -l user
Displays password aging information such as last change, expiration, and minimum/maximum days. chage -M DAYS sets the maximum password age for a user.