System Info/Monitor & Management
System Information & Management
uname -a # System info (kernel version, etc)df -h # Disk space usage (-human readable)du -sh folder/ # Size of folderfree -h # RAM usageuptime # How long system has been runningwhoami # Current userlsblk # List block devices (drives)ping google.com # Test network connectivitybtop # Fantastic all-rounder system monitoring toolSystem Management
# Service managementsystemctl status service_name # Check if service is runningsudo systemctl start service_name # Start service nowsudo systemctl stop service_name # Stop service nowsudo systemctl restart service_name # Restart servicesudo systemctl enable service_name # Start service on bootsudo systemctl disable service_name # Don't start on boot
# System-widesystemctl list-units # All active unitssystemctl list-units --failed # See what's brokensystemd-analyze # Boot time analysissystemd-analyze blame # What's slowing boot?I have had to use systemctl start/stop/enable/disable services a few times on my server when things were not just working. It turned out there was multiple processes running at once - thankfully an easy fix by killing all the processes!