Where to start First steps track · 15 stages
Linux Labs

Services

  • Service

    What a service is, how it differs from an ordinary program, and how to manage it.

    systemctl statussystemctl startsystemctl stop

    5 min
  • journalctl — reading the systemd journal

    Reading the systemd journal (journald) — filters by service, time, priority.

    journalctl -ujournalctl -xeujournalctl -p

    5 min
  • systemd

    The init system and service manager (PID 1): units, targets, dependencies, journals.

    systemctl statussystemctl startsystemctl stop

    8 min
  • systemctl — managing systemd services

    The main interface to systemd. enable turns on autostart, start runs it now — these are different operations.

    systemctl statussystemctl startsystemctl stop

    6 min
  • cloud-init — first-boot VM setup

    Automatic setup of cloud/virtual machines on first boot — user-data, debugging.

    cloud-init statuscloud-init schemaless

    4 min
  • nginx — web server and reverse proxy

    nginx serves sites from disk and forwards requests to applications; it picks a site by Host, nginx -t checks the config.

    nginx -tsystemctl reloadnginx -T

    13 min
  • sshd — the SSH server

    The OpenSSH server; edit the config with a second session open — a mistake in PermitRootLogin locks you out immediately.

    sshd -tsshd -Tsystemctl reload

    5 min
  • Cron — the task scheduler

    Running tasks on a schedule: crontab syntax, classic cron and modern systemd timers.

    crontab -ecrontab -lsystemctl list-timers

    6 min
  • Service hardening: User=, ProtectSystem, NoNewPrivileges

    Unit settings that strip a service of root, system writes and new privileges; systemd-analyze security rates them.

    systemd-analyze securitysystemctl showsystemctl edit

    13 min
  • systemd timers — scheduled jobs

    A systemd timer is a .timer unit that starts the service of the same name on a schedule; its output goes to the journal.

    systemctl list-timerssystemctl enablesystemctl start

    11 min
  • AppArmor

    Mandatory access control on Ubuntu — service profiles, enforce/complain modes.

    aa-statusjournalctl -kaa-complain

    8 min
  • PostgreSQL — access, pg_hba.conf, dump and restore

    PostgreSQL is a relational DBMS: roles and databases, pg_hba.conf access rules, pg_dump dumps and pg_restore restores.

    systemctl startpg_lsclusterspsql -h

    14 min
  • Redis — in-memory key-value store

    Cache, queues, and sessions in RAM; KEYS * blocks the server on large databases — use --scan instead.

    redis-cli pingredis-cli inforedis-cli --bigkeys

    5 min
  • unattended-upgrades: security updates with no one at the keyboard

    Ubuntu's service that installs updates from allowed origins once a day on an apt timer; by default only security ones.

    systemctl list-timerscatapt-config dump

    12 min
  • fail2ban

    Log-based banning — protecting SSH and services from brute force; jails, status, unban.

    fail2ban-client statusfail2ban-client setfail2ban-regex

    7 min
  • Docker — containers: running, ports, volumes, networks

    Docker runs programs in isolated containers started from images and manages their ports, volumes and networks.

    systemctl enabledocker rundocker ps

    23 min
  • docker compose — a container stack in one file

    docker compose describes a container stack with network, volumes and variables in compose.yaml and starts it at once.

    docker compose

    14 min
  • Ansible: inventory, modules and one-off commands

    Configures servers over SSH: from an inventory and playbooks it brings machines to a described state, no agent needed.

    ansible -iansible-inventory -iansible-playbook -i

    9 min
  • ansible-playbook: running a playbook

    Runs an Ansible playbook on the inventory machines and reports ok, changed, skipping or failed for each task.

    ansible-playbook -i

    14 min
  • timedatectl — time, time zone, and synchronization

    Manages system time and NTP; set-time requires turning off set-ntp first, or the time reverts.

    timedatectltimedatectl set-timezonetimedatectl set-ntp

    5 min
  • chrony: time synchronization over NTP

    An NTP client and server: keeps the system clock in step with time servers and can serve time to your machines.

    chronyc trackingchronyc sourceschronyc sourcestats

    13 min
  • Prometheus — metrics collection

    Collecting metrics with a pull model — targets, PromQL, exporters, alerts.

    promtool checkcurl

    3 min
  • Grafana — dashboards

    Visualizing metrics and logs — data sources, dashboards, variables, alerts.

    systemctl statusss -tlnpgrafana-cli admin

    4 min
  • hostnamectl — host name and machine info

    View and change the host name and machine info; /etc/hostname and /etc/hosts.

    hostnamectlhostname -fhostname -I

    4 min
  • Samba — file sharing over SMB

    An SMB server for Windows-compatible shares; the SMB password is separate from the system one, easy to forget to set.

    smbpasswd -atestparmsmbstatus

    5 min
  • KVM and libvirt

    Virtual machines on Linux — managed with virsh, networks, storage, console.

    virsh listvirsh startvirsh shutdown

    4 min
  • Postfix — a mail server

    Sending and receiving mail — config, the queue, logs, typical delivery debugging.

    postconf -nmailqpostqueue -f

    4 min
  • BIND9 — DNS server

    Running your own DNS — zones, records, config checks, resolving debug.

    named-checkconfnamed-checkzonerndc reload

    3 min
  • DHCP server

    Handing out addresses on a network — pool, reservations, leases, diagnostics.

    dhcpd -tcatjournalctl -u

    3 min
  • HAProxy — load balancer

    Load balancing and proxying TCP/HTTP — backends, health checks, statistics.

    haproxy -csystemctl reloadecho

    4 min
  • keepalived — high availability with VRRP

    High availability through a virtual IP — failover between nodes using VRRP.

    ip ajournalctl -u

    4 min
Loading…