Free tech learning for everyone, from basics to pro

Server ArchitectureSystems ArchitectureBeginner

Linux server essentials: distributions, services, users and packages

In short: Most internet servers run Linux. You pick a distribution with long-term support, install software with its package manager, control services with systemd and manage access with users, groups and sudo. A small set of commands covers most daily administration.

Choosing a distribution

Linux itself is the kernel. A distribution (distro) packages the kernel with tools, a package manager and a support policy. For servers, pick a release with long-term support (LTS) so you get security updates for years without large changes.

Popular server distributionsLinuxsame kernelDebian familyDebian, UbuntuRed Hat familyRHEL, Rocky, AlmaSUSESLES, openSUSEMinimalAlpine, containers
Figure 1. Distributions share the Linux kernel but differ in package tools, release cycles and support.
FamilyExamplesPackage toolTypical use
DebianDebian, Ubuntu Server LTSapt (.deb)Web servers, cloud images, general use
Red HatRHEL, Rocky Linux, AlmaLinuxdnf (.rpm)Enterprise apps needing vendor certification
SUSESLES, openSUSE Leapzypper (.rpm)SAP and enterprise estates
MinimalAlpineapkSmall container images

Packages and services

A package manager downloads signed software from trusted repositories and tracks dependencies. Always prefer the distro's packages over random downloads, because they receive security updates.

Managing a service with systemdInstallapt or dnfConfigure/etc filesEnablestart at bootStartrun nowCheckstatus, logs
Figure 2. The everyday cycle for putting a new service into production on a Linux server.
# Debian / Ubuntu
sudo apt update && sudo apt upgrade
sudo apt install nginx

# RHEL / Rocky / Alma
sudo dnf upgrade
sudo dnf install nginx

# Control the service with systemd
sudo systemctl enable --now nginx
systemctl status nginx
sudo systemctl reload nginx
journalctl -u nginx --since "1 hour ago"

Nearly all modern distributions use systemd to start services, which it calls units. enable makes a service start at boot; start runs it now; --now does both. Configuration lives under /etc, logs are read with journalctl or in /var/log, and data for services often sits in /var/lib.

Users, groups and sudo

Every process runs as a user. The root account can do anything, so you should not log in as root. Instead, create a named account and give it administrator rights through sudo, which logs every privileged command.

sudo useradd -m -s /bin/bash alice
sudo passwd alice
sudo usermod -aG sudo alice     # Debian/Ubuntu admin group
sudo usermod -aG wheel alice    # RHEL family admin group
id alice
ls -l /etc/nginx/nginx.conf

File permissions use three sets of read, write and execute bits for the owner, the group and others. For example, rw-r----- (640) lets the owner edit, the group read and everyone else nothing. Services usually run as their own low-privilege account, such as www-data.

Daily administration habits

  • Log in with SSH keys, not passwords, and disable direct root login over SSH.
  • Enable automatic security updates (for example unattended-upgrades on Ubuntu or dnf-automatic on RHEL family).
  • Turn on a host firewall such as ufw or firewalld and open only the ports you need.
  • Check disk space with df -h, memory with free -h and listening ports with ss -tulpn.

Tip: practise in a virtual machine or a free cloud instance you own. Breaking a test server is the fastest way to learn how to fix one. See Linux network commands for troubleshooting tools.

Practice

What is the difference between systemctl enable and systemctl start?
enable makes the service start automatically at boot; start runs it immediately. enable --now does both.
Which package manager would you use on Rocky Linux?
dnf, because Rocky is part of the Red Hat family and uses RPM packages.
Why use sudo instead of logging in as root?
Each admin has their own account, privileged commands are logged against that person, and mistakes are less likely because rights are used only when needed.

Key takeaways

  • Pick an LTS distribution from a well-supported family.
  • Install software from distro repositories with apt, dnf or zypper.
  • systemd manages services; journalctl reads their logs.
  • Use named accounts with sudo, SSH keys and no direct root login.
  • Patch automatically, run a host firewall and expose only needed ports.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.