Essential System Administration
File system: standard Linux directory hierarchy (/etc for config, /var for variable data/logs, /home for users, /boot for bootloader, /usr for user binaries/libraries). Hard vs symbolic links: ln (hard, same inode, same filesystem only), ln -s (symbolic, separate inode, cross-filesystem). find with -exec: find /etc -name '*.conf' -exec grep -l 'keyword' {} \; Vim basics (required for the exam): insert mode (i/a/o), command mode (Esc), :wq (save and quit), :q! (quit without saving), :%s/old/new/g (global replace), dd (delete line), yy (yank line), p (paste). Redirections: > (overwrite stdout), >> (append), 2> (stderr), | (pipe), tee (write to file and stdout simultaneously). Package management: dnf install/remove/update/search/info, dnf group install 'Development Tools', subscription-manager (register RHEL with Red Hat). rpm -qa (list installed), rpm -qf /path/to/file (which package owns a file), rpm -ql package (list files in package).
Users, Groups, Permissions, and SELinux
User management: useradd -m -s /bin/bash -G wheel username, passwd username, usermod -aG groupname username, chage -M 90 -W 7 username (max days, warning days). /etc/passwd (UID, GID, home, shell), /etc/shadow (encrypted password, aging), /etc/group. SELinux: the most RHCSA-specific topic. Modes: Enforcing (blocks and logs), Permissive (only logs), Disabled (requires reboot to change). getenforce/setenforce 0|1. /etc/selinux/config for persistent mode. Context: ls -Z (file), ps -Z (process), id -Z (user). Fixing context issues: restorecon -Rv /path (restore default context), chcon -t type /file (change temporarily), semanage fcontext -a -t type '/path(/.*)?' + restorecon (permanent). Booleans: getsebool -a | grep http, setsebool -P httpd_can_network_connect on.
Storage: Partitions, LVM, and File Systems
Partitioning: fdisk (MBR/DOS partition tables), gdisk (GPT). lsblk to see block device tree. After partitioning: partprobe to inform kernel of changes without reboot. LVM full workflow: pvcreate /dev/sdb1, vgcreate vg_data /dev/sdb1, lvcreate -L 5G -n lv_data vg_data, mkfs.xfs /dev/vg_data/lv_data, mkdir /mnt/data, echo '/dev/vg_data/lv_data /mnt/data xfs defaults 0 0' >> /etc/fstab, mount -a. Extension: lvextend -L +2G /dev/vg_data/lv_data, xfs_growfs /mnt/data (online for XFS), resize2fs /dev/... (for ext4). Swap: mkswap /dev/sdX, swapon /dev/sdX, add to /etc/fstab with type swap. Stratis and VDO: newer storage management technologies covered in RHCSA — Stratis provides ZFS-like features (thin provisioning, snapshots), VDO provides deduplication and compression.
Services, Networking, Scheduling, and Boot
systemd: systemctl start/stop/restart/enable/disable. Service unit file locations, override with systemctl edit (creates drop-in). Persistent log: journalctl -u service -b (since boot), --since '1 hour ago'. Target units: multi-user.target (no GUI), graphical.target (with GUI). Networking: nmcli connection show, nmcli connection modify 'name' ipv4.addresses 192.168.1.10/24, nmcli connection modify 'name' ipv4.gateway 192.168.1.1, nmcli connection up 'name'. Hostname: hostnamectl set-hostname new-hostname. Firewalld: firewall-cmd --add-service=http --permanent, --reload. Scheduling: crontab -e (user), /etc/cron.d/ (system), at command for one-time tasks. Boot process: GRUB2 bootloader (/boot/grub2/grub.cfg, grub2-mkconfig -o /boot/grub2/grub.cfg), emergency/rescue targets (rd.break kernel parameter for root password reset — this is a guaranteed exam task). Interrupt GRUB, append rd.break, chroot, passwd, restorecon /.autorelabel.