OLE study materials
OLE study resources

OLE cheat sheet

OLE · Keep the key ideas within reach.

Quick reference

Oracle Linux Installation, Deployment, and System Configuration

  • Installation media: Oracle Linux ISOs include both UEK and RHCK kernels; select the desired kernel at boot by choosing the corresponding GRUB menu entry.

  • Kickstart files automate installation; use the inst.ks= boot parameter to specify a URL or path to the kickstart file.

  • The oracle-database-preinstall-* package applies recommended kernel parameters and user/group settings for Oracle Database.

  • /etc/oracle-release and /etc/os-release identify the Oracle Linux version; uname -r shows the running kernel (UEK vs RHCK).

  • oraclelinux-release and oraclelinux-release-el8 (or el9) packages provide repository definitions; do not remove them.

  • System configuration after install: timedatectl for timezone/NTP, localectl for locale/keyboard, hostnamectl for hostname.

  • sos report collects system configuration and logs for support; stored in /var/tmp/sosreport-*.

  • /etc/sysconfig/ contains network and service configuration files; nmcli and nmtui manage NetworkManager connections.

Quick reference

Package Management with RPM and DNF/YUM, Oracle Linux Repositories and ULN

  • RPM queries: rpm -qa lists installed packages; rpm -qi pkg shows info; rpm -ql pkg lists files; rpm -qf /path finds owning package.

  • RPM verification: rpm -V pkg checks file attributes; rpm -Va verifies all packages.

  • DNF commands: dnf install, remove, update, search, info, provides, history, repoquery.

  • dnf module list and dnf module enable/install manage AppStream modules; module streams select versions.

  • Oracle Linux yum repositories: ol8_baseos_latest, ol8_appstream, ol8_addons, ol8_UEKR7, ol8_UEKR6; enable/disable with dnf config-manager --enable/--disable.

  • ULN (Unbreakable Linux Network) requires a support subscription; register with uln_register or uln_register --server=...; channels are managed via uln-channel.

  • dnf repolist shows enabled repositories; dnf clean all clears cached metadata; dnf makecache refreshes metadata.

  • yum is a symlink to dnf on Oracle Linux 8+; configuration in /etc/dnf/dnf.conf and /etc/yum.repos.d/*.repo.

Quick reference

Storage Administration: LVM, Filesystems, Mount Configuration, and Disk Management

  • LVM stack: physical volumes (pvcreate), volume groups (vgcreate), logical volumes (lvcreate -L size -n name vg).

  • Extend LV: lvextend -L +size /dev/vg/lv then xfs_growfs /mount or resize2fs /dev/vg/lv for ext4.

  • lsblk, blkid, fdisk -l, parted -l list block devices, filesystem UUIDs, and partition tables.

  • /etc/fstab fields: device, mount point, fstype, options, dump, fsck order; use UUID= or LABEL= for persistent mounts.

  • mount -a mounts all fstab entries; findmnt --verify checks fstab syntax; systemctl daemon-reload after fstab changes.

  • XFS cannot be shrunk; ext4 can be resized with resize2fs. XFS grow uses xfs_growfs.

  • df -h shows filesystem usage; du -sh shows directory usage; lvs, vgs, pvs display LVM status.

  • Swap: mkswap /dev/vg/swap, swapon, and add to fstab with swap fstype.

Quick reference

Network Configuration and Services Management with NetworkManager and systemd

  • nmcli connection show lists connections; nmcli device status shows device state; nmcli con up/down name activates/deactivates.

  • Create connection: nmcli con add type ethernet ifname eth0 con-name myconn ipv4.method manual ipv4.addresses 192.0.2.10/24 ipv4.gateway 192.0.2.1 ipv4.dns 192.0.2.53.

  • nmcli con mod myconn ipv4.dns "8.8.8.8 1.1.1.1"; apply with nmcli con up myconn.

  • Configuration files stored in /etc/NetworkManager/system-connections/; nmcli con reload rereads them.

  • systemctl manages services: start, stop, restart, enable, disable, status, is-active, is-enabled.

  • systemctl list-units --type=service lists services; systemctl list-unit-files shows enablement state.

  • ss -tulpn shows listening ports and owning processes; ip addr, ip route display addresses and routes.

  • hostnamectl set-hostname name sets static hostname; NetworkManager dispatcher scripts run on network events.

Quick reference

User and Group Administration, Permissions, and Access Control

  • useradd, usermod, userdel -r, groupadd, groupmod, groupdel manage accounts; defaults in /etc/default/useradd and /etc/login.defs.

  • passwd, chage -l user, chage -M days user manage password aging; chage -d 0 user forces change at next login.

  • /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow store account data; use vipw/vigr for safe editing.

  • Permission bits: chmod ugo+rwx, symbolic or octal (e.g., 755). chown user:group file changes ownership.

  • Special bits: setuid (4), setgid (2), sticky (1). chmod 4755 file sets setuid; chmod 1777 dir sets sticky.

  • umask value determines default permissions: files 666 & ~umask, directories 777 & ~umask.

  • ACLs: setfacl -m u:user:rw file, getfacl file; default ACLs on directories with setfacl -d.

  • sudo configuration in /etc/sudoers (edit with visudo); sudo -l lists allowed commands.

Quick reference

Kernel and Boot Management: GRUB 2, Kernel Modules, and Boot Troubleshooting

  • GRUB 2 configuration: /boot/grub2/grub.cfg (BIOS) or /boot/efi/EFI/oracle/grub.cfg (UEFI); regenerate with grub2-mkconfig -o /boot/grub2/grub.cfg.

  • Default kernel: grub2-set-default 0 or grub2-set-default 'Oracle Linux Server (UEK)'; verify with grub2-editenv list.

  • Kernel parameters: edit /etc/default/grub (GRUB_CMDLINE_LINUX), then run grub2-mkconfig.

  • lsmod, modinfo module, modprobe module, rmmod module manage kernel modules; persistent modules in /etc/modules-load.d/.

  • dracut -f regenerates initramfs; required after kernel or storage driver changes.

  • Boot troubleshooting: systemctl rescue or systemctl emergency; add rd.break or init=/bin/bash to kernel cmdline for recovery.

  • journalctl -b -1 shows previous boot logs; journalctl -k shows kernel messages.

  • uname -r shows running kernel; rpm -qa kernel-uek lists installed UEK kernels.

Quick reference

System Monitoring, Logging, and Performance Troubleshooting

  • top, htop, vmstat 1, iostat -x 1, mpstat -P ALL 1, pidstat monitor CPU, memory, I/O, and per-process stats.

  • free -h shows memory; sar -u 1 5 (sysstat) shows historical CPU; sar -r memory; sar -d disk.

  • journalctl -u service, journalctl -p err, journalctl --since "1 hour ago" query systemd journal.

  • Rsyslog configuration: /etc/rsyslog.conf and /etc/rsyslog.d/*.conf; logs in /var/log/ (messages, secure, cron).

  • logrotate configuration in /etc/logrotate.conf and /etc/logrotate.d/; test with logrotate -d.

  • df -i checks inode usage; lsof +D /path shows open files; fuser -v /mount shows processes using a mount.

  • dmesg -T shows kernel ring buffer with timestamps; dmesg -w follows.

  • systemd-analyze blame shows boot time per unit; systemd-analyze critical-chain shows dependency chain.

Quick reference

Security Administration: SELinux, firewalld, and System Hardening

  • SELinux modes: enforcing, permissive, disabled; set in /etc/selinux/config; runtime with setenforce 1|0; check with getenforce.

  • sestatus shows mode, policy, and booleans; getsebool -a, setsebool -P boolean on manage booleans.

  • File contexts: ls -Z, chcon, restorecon -Rv /path; persistent mapping with semanage fcontext -a -t type '/path(/.*)?'.

  • ausearch -m avc -ts recent and sealert -a /var/log/audit/audit.log diagnose SELinux denials.

  • firewalld: firewall-cmd --state, --get-active-zones, --add-service=http --permanent, --reload.

  • Open ports: firewall-cmd --add-port=8080/tcp --permanent; list with --list-all; zones in /etc/firewalld/zones/.

  • fail2ban or pam_faillock lock accounts after failed logins; configure in /etc/security/faillock.conf.

  • sshd_config hardening: PermitRootLogin no, PasswordAuthentication no, AllowUsers, MaxAuthTries; restart sshd.

Quick reference

Shell Scripting and Task Automation with cron and systemd Timers

  • Script header: #!/bin/bash; make executable with chmod +x script; run with ./script or bash script.

  • Variables: VAR=value (no spaces); use "$VAR"; command substitution $(command); arithmetic $((expression)).

  • Conditionals: if [ condition ]; then ...; fi; test operators -f, -d, -eq, -ne, -z; [[ ]] for pattern matching.

  • Loops: for i in list; do ...; done; while read line; do ...; done < file; case statement for multiple branches.

  • cron: user crontab with crontab -e; format min hour day month weekday command; system cron in /etc/cron.d/, /etc/cron.daily/.

  • cron environment is minimal; set PATH and use absolute paths; output mailed to owner unless redirected.

  • systemd timer: .timer unit with OnCalendar= or OnBootSec=; enable with systemctl enable --now mytimer.timer; check systemctl list-timers.

  • Timer unit pairs with .service unit of same name; Persistent=true runs missed jobs after downtime.

Quick reference

Oracle Linux-Specific Technologies: UEK, Ksplice, btrfs, and Oracle Cloud Tooling

  • UEK (Unbreakable Enterprise Kernel) is Oracle's kernel, default on Oracle Linux; RHCK (Red Hat Compatible Kernel) is available as an alternative.

  • UEK packages: kernel-uek, kernel-uek-devel, kernel-uek-headers; install with dnf install kernel-uek.

  • Ksplice applies kernel updates without reboot; requires ULN or Oracle Linux yum server access and the ksplice client.

  • Ksplice commands: uptrack-upgrade -y applies updates; uptrack-show lists effective patches; uptrack-uname -r shows effective kernel.

  • Btrfs is available in Oracle Linux (Technology Preview in some releases); create with mkfs.btrfs, mount, manage subvolumes with btrfs subvolume create.

  • Btrfs snapshots: btrfs subvolume snapshot /mnt/data /mnt/snap; send/receive for replication.

  • Oracle Cloud Infrastructure (OCI) tooling: oci CLI, instance metadata service at http://169.254.169.254/opc/v1/.

  • OCI utilities: oci-metadata (or curl metadata endpoints) retrieves instance details; oci os object put manages Object Storage.