Linux Terminal & Sysadmin Commands Matrix
High-speed Linux CLI reference: disk space inspection, memory usage, UFW firewall rules, and process control.
System Diagnostics (4 commands)
htop
Interactive process viewer and system monitor (CPU cores, RAM usage, swap).
df -h
Displays available disk space on all mounted filesystems in human-readable format (GB/MB).
free -m
Shows total, used, and available physical memory (RAM) and swap in megabytes.
uptime
Tells how long the system has been running alongside 1, 5, and 15 minute load averages.
File Operations (4 commands)
du -sh * | sort -h
Calculates sizes of all folders in current directory and sorts them from smallest to largest.
find . -type f -name "*.log" -size +100M
Finds all files ending in .log larger than 100 megabytes in the current path.
tar -czvf backup-$(date +%F).tar.gz /var/www/html
Archives and compresses the entire /var/www/html folder into a gzip tarball with today's date.
tail -f -n 50 /var/log/nginx/error.log
Monitors Nginx error log file in real time starting with the last 50 lines.
Permissions & Security (2 commands)
chmod -R 755 /var/www/html && chmod -R 644 /var/www/html/*.*
Standard webmaster security: sets folders to 755 and files to 644.
chown -R www-data:www-data /var/www/html
Assigns recursive ownership of website files to the standard Nginx/Apache user.
Network & Connectivity (3 commands)
ss -tulpn
Lists all listening TCP/UDP sockets with process names and port numbers.
curl -I https://prowebtools.online
Fetches HTTP response headers only without downloading page body.
ufw status verbose
Displays the state of Uncomplicated Firewall (UFW) with active rules.
Process Management (3 commands)
systemctl restart nginx
Restarts the Nginx web server service daemon.
journalctl -u php8.2-fpm -n 50 --no-pager
Inspects systemd journal logs for the PHP-FPM service.
kill -9 <PID>
Immediately terminates an unresponsive process by its Process ID.