Linux Admin Commands for Developers and DBAs
Linux administration is easier when you inspect the host in layers: identity, packages, services, logs, ports, storage and users. A DBA can use this order before opening Cockpit, tuning SQL or changing a firewall.
Host and distribution
hostnamectl
cat /etc/os-release
uname -a
date -Is
whoami
pwdServices and logs
systemctl --failed --no-pager
systemctl status postgresql --no-pager
systemctl status mysql --no-pager
systemctl status nginx --no-pager
journalctl -p warning -n 100 --no-pager
journalctl -u postgresql -n 80 --no-pagerPorts and firewall
ss -tulpn
sudo ss -tulpn | grep -E ':(22|80|443|9090|5432|3306|1433)\b'
sudo firewall-cmd --list-all 2>/dev/null
sudo ufw status verbose 2>/dev/nullStorage and IO
df -h
df -ih
lsblk
mount | column -t
iostat -xz 1 3 2>/dev/null
du -sh /var/lib/postgresql /var/lib/mysql /var/log 2>/dev/nullPackages and updates
Package changes should follow maintenance policy. These commands identify package manager state without forcing an update.
command -v apt dnf yum zypper pacman
apt list --upgradable 2>/dev/null | head
dnf check-update 2>/dev/null | head
yum check-update 2>/dev/null | headUser and permission checks
id
groups
sudo -l
last -n 10
find /etc/sudoers.d -maxdepth 1 -type f -printWhen to open Cockpit
Use Cockpit when the team needs a browser-based view of services, logs, storage or network state. Use SSH when you need exact command history, automation or a text-only emergency path.
A Linux admin check is stronger when it is timestamped. Copy the host, time and command output into the incident note before changing the server.
Related: Terminal Workflows, DBA Admin Roadmap, Hardware Diagnostics.