Getting Started with Debian 12 (Bookworm) on Your VPS
Debian 12 Bookworm setup, SSH access, system updates, firewall configuration, package management, storage setup, and common tools.
On this page
Debian 12 (Bookworm) is the current stable release with modern packages, improved performance, and long-term support until 2026. Debian is known for stability, security, and minimal bloat. Perfect for production servers, development, and learning Linux.
About Debian 12
- Release date: June 2023
- LTS support until: June 2026 (and longer)
- Package manager: apt/dpkg
- Init system: systemd
- Kernel: Linux 6.1+
Connect via SSH
ssh root@your-vps-ip
# Or with SSH key
ssh -i ~/.ssh/id_rsa root@your-vps-ip
Once logged in, you're in the root shell. All commands require no sudo.
Update System
# Update package lists
apt update
# Upgrade packages to latest versions
apt upgrade -y
# Install security updates (recommended)
apt install unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades
User Management
# Create new user (instead of using root)
useradd -m -s /bin/bash deploy
# Set password
passwd deploy
# Add to sudo group
usermod -aG sudo deploy
# Switch to user
su - deploy
Configure Firewall
# Install firewall (ufw)
apt install ufw -y
# Enable firewall
ufw enable
# Allow SSH (critical!)
ufw allow 22/tcp
# Allow HTTP/HTTPS
ufw allow 80/tcp
ufw allow 443/tcp
# Check status
ufw status
Disk & Storage
# Check disk space
df -h # Overall usage
du -sh /* # Per-directory breakdown
# Check disk usage by process
ps aux --sort=-%mem | head -10
# List mounted filesystems
lsblk # Block devices
mount # Mounted filesystems
Package Management
| Command | Purpose |
|---|---|
apt search package | Search for a package |
apt install package | Install a package |
apt remove package | Remove a package |
apt autoremove | Remove unused dependencies |
apt update && apt upgrade | Update and upgrade all packages |
Monitor Resources
# Check CPU and memory
top # Real-time resource usage
free -h # Memory summary
# Check system uptime
uptime
# View last login
last
# Check network connections
netstat -tlnp
ss -tlnp
Enable unattended-upgrades to apply security patches automatically. Debian updates are stable and safe for production servers. Regular updates prevent security vulnerabilities.
Related: OS comparison | Choose your OS | VPS setup | Linux basics
Need a server with this OS?
Deploy Linux or Windows workloads on an UnderHost Cloud VPS or dedicated server with the operating system that fits your stack.





















