Bash Scripting Cheat Sheet
Write safer Bash scripts with arguments, quoting, arrays, conditions, functions, option parsing, temporary files, traps, and static checks.
Open cheat sheet6 organized subcategories
Shell commands, files, processes, networking, and permissions.
Choose a focus
48 focused guides grouped by the kind of task you need to complete.
Work efficiently with shells, files, text, archives, backups, and schedules.
Browse subcategory 11 guidesManage users, authentication, privileges, policy, auditing, and cryptography.
Browse subcategory 10 guidesOperate processes, services, boot, packages, devices, logs, and kernel settings.
Browse subcategory 7 guidesConfigure filesystems, volumes, RAID, memory-backed storage, and network shares.
Browse subcategory 7 guidesDiagnose, route, secure, and connect Linux networks and services.
Browse subcategory 6 guidesIsolate workloads, run virtual machines, control resources, and inspect performance.
Browse subcategory7 cheat sheets
Work efficiently with shells, files, text, archives, backups, and schedules.
Write safer Bash scripts with arguments, quoting, arrays, conditions, functions, option parsing, temporary files, traps, and static checks.
Open cheat sheetSchedule, validate, inspect, and troubleshoot recurring cron jobs, one-time at jobs, and catch-up anacron jobs safely on Linux.
Open cheat sheetCreate, inspect, extract, and verify tar archives and gzip or xz streams safely, with explicit destinations, exclusions, ownership controls, and checksums.
Open cheat sheetInspect, set, export, scope, persist, and debug Linux environment variables, PATH, locale, shell startup files, and systemd service environments.
Open cheat sheetNavigate, inspect, create, copy, move, search, and safely remove Linux files and directories from the shell.
Open cheat sheetFilter, transform, extract, sort, count, and summarize text safely with grep, sed, awk, cut, sort, uniq, tr, and wc.
Open cheat sheetSynchronize files and build recoverable rsync backups with dry runs, safe deletion, SSH transport, hard-linked snapshots, verification, and restore testing.
Open cheat sheet11 cheat sheets
Manage users, authentication, privileges, policy, auditing, and cryptography.
Inspect AppArmor confinement, author least-privilege profiles, diagnose denials, validate policy, and deploy or roll back changes safely.
Open cheat sheetInspect Linux Audit health, design efficient rules, manage persistent auditd policy, search complete events, and protect audit evidence safely.
Open cheat sheetAudit and manage Linux process capabilities, file capabilities, securebits, systemd bounding sets, extended attributes, and immutable or append-only flags.
Open cheat sheetUnderstand and troubleshoot Linux PAM stacks, control flags, module types, password policy, lockouts, access rules, sessions, and safe configuration changes.
Open cheat sheetInspect and manage Linux file modes, ownership, default permissions, and special directory permissions safely.
Open cheat sheetDesign least-privilege sudoers policy, validate changes with visudo, constrain commands and run-as identities, and audit delegated access safely.
Open cheat sheetInspect and administer Linux user and group identities, supplementary membership, passwords, account aging, shells, and retirement with explicit safeguards.
Open cheat sheetConnect, authenticate, forward ports, verify host keys, copy files, configure aliases, and troubleshoot OpenSSH clients safely.
Open cheat sheetInspect certificates, CSRs, private keys, PKCS#12 bundles, verification chains, and live TLS endpoints safely with current OpenSSL commands.
Open cheat sheetInspect SELinux state, diagnose AVC denials, manage persistent file labels, booleans, ports, and narrowly scoped troubleshooting safely.
Open cheat sheetIntegrate Linux with Active Directory, FreeIPA, or LDAP through SSSD using secure discovery, identity lookup, access policy, caching, and diagnostics.
Open cheat sheet10 cheat sheets
Operate processes, services, boot, packages, devices, logs, and kernel settings.
Diagnose Linux crashes and system-call failures with coredumpctl, GDB, strace, procfs, debuginfo, resource limits, and privacy-aware evidence handling.
Open cheat sheetTrace Linux boot stages, inspect kernel arguments and initramfs contents, analyze systemd startup, and recover failed boots with controlled changes.
Open cheat sheetInspect, load, configure, persist, validate, and troubleshoot Linux kernel modules and sysctl parameters without bypassing safety controls.
Open cheat sheetInspect, search, install, upgrade, verify, and remove packages with APT, DNF, and Flatpak while respecting repositories and transaction safety.
Open cheat sheetInspect, find, monitor, prioritize, background, wait for, and safely signal Linux processes with ps, top, pgrep, jobs, nice, and kill.
Open cheat sheetConfigure, verify, and troubleshoot chronyd time synchronization with NTP, NTS, source selection, clock stepping, RTC policy, and safe fleet operations.
Open cheat sheetDesign, test, and troubleshoot logrotate policies with safe rotation, retention, compression, ownership, signaling, state files, and systemd scheduling.
Open cheat sheetInspect and operate systemd services with systemctl, then filter current-boot, unit, time, priority, kernel, and live logs with journalctl.
Open cheat sheetCreate, inspect, validate, enable, troubleshoot, and harden systemd timer and service units with calendar, monotonic, persistent, randomized, and dependency-aware scheduling.
Open cheat sheetObserve Linux device events, inspect sysfs attributes, write deterministic udev rules, validate matching, and deploy changes safely.
Open cheat sheet7 cheat sheets
Configure filesystems, volumes, RAID, memory-backed storage, and network shares.
Inspect, check, and safely repair ext4 and XFS filesystems with mount-state verification, backups, e2fsck, xfs_repair, recovery planning, and diagnostics.
Open cheat sheetDesign, create, assemble, monitor, scrub, repair, and reshape Linux MD software RAID arrays safely with mdadm and kernel MD interfaces.
Open cheat sheetInspect Linux block devices, filesystems, mounts, space and inode use, fstab configuration, busy mount points, and safe synchronization.
Open cheat sheetAdminister LVM physical volumes, volume groups, logical volumes, thin pools, snapshots, migrations, activation, and metadata recovery safely.
Open cheat sheetOperate Linux NFS clients, servers, and autofs mounts with version negotiation, Kerberos security, resilient mount options, diagnostics, and safe recovery.
Open cheat sheetConfigure and troubleshoot secure Samba file shares with smb.conf validation, ACLs, protocol hardening, client tests, sessions, and safe reloads.
Open cheat sheetDiagnose Linux memory pressure and operate swap, zram, zswap, PSI, reclaim, and OOM behavior with capacity planning and safe change procedures.
Open cheat sheet7 cheat sheets
Diagnose, route, secure, and connect Linux networks and services.
Inspect HTTP requests, response headers, redirects, TLS, timing, status failures, JSON payloads, authentication, downloads, retries, and proxies with curl.
Open cheat sheetInspect and change Linux routes, policy rules, neighbors, links, namespaces, and traffic control with iproute2, rollback planning, and persistent configuration.
Open cheat sheetDiagnose Linux name resolution with getent, dig, resolvectl, NSS, split DNS, resolver caches, and DNSSEC-aware checks without confusing application and DNS paths.
Open cheat sheetDiagnose Linux connectivity layer by layer with ip, ping, ss, getent, dig, and curl while separating local, DNS, transport, and HTTP failures.
Open cheat sheetInspect, validate, trace, back up, and manage nftables tables, chains, rules, sets, counters, and atomic ruleset changes safely.
Open cheat sheetManage Linux Wi-Fi and NetworkManager connection profiles with nmcli, safe activation, secret handling, routing, DNS, checkpoints, and diagnostics.
Open cheat sheetConfigure and troubleshoot WireGuard tunnels on Linux with safe key handling, AllowedIPs, routing, firewalls, NAT, MTU, and key rotation.
Open cheat sheet6 cheat sheets
Isolate workloads, run virtual machines, control resources, and inspect performance.
Identify cgroup v2, apply CPU, memory, I/O, and task controls with systemd, inspect pressure and limit events, and understand safe hierarchy and delegation rules.
Open cheat sheetRun and operate rootless Podman containers with secure defaults, durable storage, health checks, Quadlet services, secrets, updates, and recoverable backups.
Open cheat sheetInspect Linux namespace membership, create scoped user, mount, PID, UTS, and network namespaces, and enter target namespaces safely with unshare, nsenter, and lsns.
Open cheat sheetMeasure Linux CPU, memory, I/O, pressure, and per-process behavior with procps, sysstat, PSI, and perf using a production-safe workflow.
Open cheat sheetUse Linux perf, ftrace, tracepoints, BPF, bpftool, and bpftrace for production observability with bounded overhead, symbol safety, and cleanup.
Open cheat sheetValidate KVM hosts and operate libvirt virtual machines with safe lifecycle, storage, networking, guest-agent, backup, migration, and security practices.
Open cheat sheet