Choose an OS for VPS: How Ubuntu, Debian, and AlmaLinux Differ
When you spin up a VPS for the first time, most providers let you choose from several operating systems. They all look similar at first glance, but each has distinct strengths. This article compares the most popular Linux distributions and when to use each one.
Ubuntu LTS
Ubuntu is the go-to choice for most people just starting out. It has the most tutorials and documentation online. Most questions already have answers on Stack Overflow and the Ubuntu Forums.
Pros
- Largest community — easy to find answers and help
- Most software packages are available immediately
- LTS (Long Term Support) receives updates for 5 years
- Beginner-friendly with extensive online resources
Cons
- Slightly larger than Debian with slightly higher RAM usage
- Ubuntu sometimes includes snap packages by default, which not everyone likes
Debian Stable
Debian is the distribution that Ubuntu was built on. It emphasizes stability above all else. Packages in the stable branch undergo extensive testing before release.
Pros
- Extremely stable — packages in stable rarely cause problems
- Lighter than Ubuntu with lower RAM usage
- Ideal for production servers where uptime and stability matter most
Cons
- Packages in stable can be outdated, especially PHP and Node.js versions
- For newer software versions, you'll need to add backports or custom repositories
AlmaLinux / Rocky Linux
These two are community-driven replacements for CentOS, created after Red Hat changed its support model. They suit users familiar with CentOS or those needing RHEL compatibility.
Pros
- Binary-compatible with RHEL (Red Hat Enterprise Linux) standard
- Long term support extends for 10 years
- Ideal for organizations requiring enterprise compliance or certifications
Cons
- Some software requires adding EPEL (Extra Packages for Enterprise Linux) separately
- Beginners unfamiliar with RPM-based distributions may find it slightly confusing
Comparison Table
| Criteria | Ubuntu LTS | Debian Stable | AlmaLinux |
|---|---|---|---|
| Package manager | apt | apt | dnf |
| Community/Docs | Very large | Large | Medium |
| Stability | Good | Excellent | Excellent |
| Latest packages | Fairly recent | Older | Depends on RHEL |
| Best for | General use/Beginners | Production stability | Enterprise |
| LTS support | 5 years | ~5 years | 10 years |
Recommendations
- If you're just starting: Ubuntu LTS — most tutorials, easiest to find answers
- If you need maximum stability: Debian Stable — perfect for production when you don't need cutting-edge versions
- If you have CentOS/RHEL experience: AlmaLinux — no need to relearn a new system
Summary
There's no "best" OS for everyone, but if you have no special requirements, Ubuntu LTS is the safest choice for beginners. It has enough online resources that you can solve most problems on your own.
Common Commands After Installing a Fresh OS
# Update all packages (Ubuntu/Debian)
apt update && apt upgrade -y
# Update packages (AlmaLinux/Rocky)
dnf update -y
# Check OS version
cat /etc/os-release
# Check kernel version
uname -r
Verify the OS is Working Correctly
# Check system information
uname -a
# List the Linux release information
cat /etc/os-release
# Check if your distribution is Ubuntu, Debian, or AlmaLinux
lsb_release -a # Ubuntu/Debian
# Or for AlmaLinux/Rocky
cat /etc/redhat-release
Common Issues & Troubleshooting
Error: "apt: command not found" on AlmaLinux
AlmaLinux uses dnf/yum, not apt:
# AlmaLinux/Rocky Linux/CentOS
dnf install nginx
dnf install php php-fpm
dnf install mariadb-server
Ubuntu: snap packages installed automatically (e.g., snapd, firefox)
Some Ubuntu versions install snap firefox by default instead of apt. If you prefer the apt version, you can remove it:
# Remove snap firefox (Ubuntu 22.04+)
snap remove firefox
apt install firefox-esr # Install from apt instead
# See what snap packages are installed
snap list
Debian: PHP or other packages are very old
Debian Stable prioritizes stability, so packages are often older. For newer versions, add backports:
# Add backports to sources.list
echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list
apt update
# Install from backports
apt install -t bookworm-backports nginx
Error: "locale: Cannot set LC_ALL" after new SSH login
You need to configure locales on a freshly deployed server:
# Ubuntu/Debian
locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8
dpkg-reconfigure locales
Frequently Asked Questions
Can I switch OS without recreating my VPS?
Not usually. Changing operating systems requires going through your VPS provider's reinstall process, which typically formats the disk. Always back up your data before switching.
Do Ubuntu and Debian differ in command line usage?
Barely. Both use apt, and most commands work identically on both. The main differences are in default package versions and release schedules, not in core command syntax.
Can I use old CentOS tutorials with AlmaLinux?
Mostly yes. AlmaLinux is binary-compatible with RHEL and most CentOS 8 tutorials work on AlmaLinux. However, CentOS 7 used yum while AlmaLinux uses dnf, so some commands differ.