Disk usage, logging, shutdown, hostname/shaare/V4gBWg
Disk and Memory Info
df
→ disk partition infodf -h
→ human-readable formatdu
→ size of file/directoryfree
→ memory infocat /proc/cpuinfo
→ CPU infocat /proc/meminfo
→ memory info
System Logs & Diagnostics
dmesg
→ check kernel ring buffer logsiostat
→ check disk I/O statsip route | column -t
→ check routing tabless
→ view open ports/sockets
Log Directory Structure
-
Logs in
/var/log/
boot
→ startup recordschronyd
→ NTP infocron
→ cron jobsmaillog
→ mail daemonsecure
→ login/logout trackingmessages
→ general trace logshttpd
→ web server errors
Log Monitoring
tail -f filename
→ follow log file in real time
System Shutdown & Boot Control
shutdown
→ graceful shutdowninit 0-6
→ runlevels (0=off, 3=multi-user, 6=reboot)reboot
→ reboot systemhalt
→ force shutdown immediately
Hostname Management
cat /etc/hostname
→ current hostnamehostnamectl set-hostname myhostname
→ change hostname