Essential System

Core Debian system commands for package management, system information, and process management

Package Management

apt update

  • Refreshes package repository lists
  • Run before installing packages

apt upgrade

  • Updates all installed packages
  • Use -y flag for non-interactive

apt install [package]

  • Installs specified package
  • Resolves dependencies automatically

apt remove [package]

  • Removes package, keeps config files

apt purge [package]

  • Removes package and config files

System Information

uname -a

  • Shows kernel and system info
  • Architecture, version, hostname

lsb_release -a

  • Displays Debian version details
  • Codename and description

df -h

  • Shows disk space usage
  • Human readable format

free -h

  • Displays memory usage
  • RAM and swap information

Process Management

ps aux

  • Lists all running processes
  • Shows PID, CPU, memory usage

top

  • Real-time process monitor
  • Press q to quit

systemctl status [service]

  • Shows service status
  • Active, inactive, failed states

systemctl start [service]

  • Starts specified service

systemctl stop [service]

  • Stops specified service

Example Package Install

1
2
3
4
sudo apt update
sudo apt install nginx
sudo systemctl enable nginx
sudo systemctl start nginx