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.
| Family | Examples | Package tool | Typical use |
|---|---|---|---|
| Debian | Debian, Ubuntu Server LTS | apt (.deb) | Web servers, cloud images, general use |
| Red Hat | RHEL, Rocky Linux, AlmaLinux | dnf (.rpm) | Enterprise apps needing vendor certification |
| SUSE | SLES, openSUSE Leap | zypper (.rpm) | SAP and enterprise estates |
| Minimal | Alpine | apk | Small 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.
# 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-upgradeson Ubuntu ordnf-automaticon RHEL family). - Turn on a host firewall such as
ufworfirewalldand open only the ports you need. - Check disk space with
df -h, memory withfree -hand listening ports withss -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?
Which package manager would you use on Rocky Linux?
Why use sudo instead of logging in as root?
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.
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.