Linux terminal and command line

Choose an OS for VPS: How Ubuntu, Debian, and AlmaLinux Differ

June 2026 · 6 min read

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

Cons

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

Cons

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

Cons


Comparison Table

CriteriaUbuntu LTSDebian StableAlmaLinux
Package manageraptaptdnf
Community/DocsVery largeLargeMedium
StabilityGoodExcellentExcellent
Latest packagesFairly recentOlderDepends on RHEL
Best forGeneral use/BeginnersProduction stabilityEnterprise
LTS support5 years~5 years10 years

Recommendations


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
First steps after installing a fresh OS: Create a non-root user, set up SSH key-based authentication, disable password login, and enable a firewall immediately.

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
Tip: Run these commands right after connecting to your VPS to confirm the OS and kernel version match what your provider offered.

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.