Overview
This hub collects practical Linux notes you can reference during on-call and project work. The two nested folders cover shell essentials and systemd troubleshooting with longer walkthroughs to exercise the navigation and TOC.
What’s inside
cli/essentials— Daily driver shell commands, file ops, networking, and process inspection.systemd/troubleshooting— Service checks, log review, and restart strategies.
Quick sanity checks
uname -a— confirm kernel and architecturelsb_release -aor/etc/os-release— confirm distrowhoami && id— confirm user and group membershipdf -handlsblk— confirm disks and mounts
Common tasks
Package management
- Debian/Ubuntu:
sudo apt update && sudo apt upgrade - RHEL/Fedora:
sudo dnf check-update && sudo dnf upgrade - Alpine:
sudo apk update && sudo apk upgrade
Logs to grab first
journalctl -p err -b— errors since last bootdmesg -T | tail -n 30— kernel hints/var/log/auth.logor/var/log/secure— auth anomalies
Networking triage
ip a— addressesip r— routesss -tulpn | head— listening socketsdig example.com @resolver— DNS sanity
File permissions refresher
chmod u+rwx,g+rx,o-rwx file— explicit modechown appuser:appgroup /srv/app— ownershipsetfacl -m u:deploy:rw /srv/app— ACL for one user
Troubleshooting checklist
- Reproduce and timestamp the issue.
- Check service status and logs.
- Validate dependencies (network, disk, env vars).
- Apply smallest safe change; capture the diff/command.
- Re-test, roll back if needed, and document the fix.