UbuntuLinux
Server basics
What a server is, how to log in safely, and how to keep it tidy and updated.
- 19 lessons
- 4h 21m estimated time
- 4 hands-on labs
- 2 animated diagrams
- 19 quizzes
18 beginner, 1 intermediate. Start at the top or pick a chapter below.
0 of 19 done
Saved in this browser as you finish lessons.
Get in
What a server is and how to reach it safely with SSH.
01 Up next What is a VPS (virtual private server)? A VPS (virtual private server) is a rented virtual machine with its own operating system, address and root access, running on a provider's hardware. 8 min Beginner Diagram 02 Up next Log in to a server with SSH keys An SSH key pair lets you log in to a server by proving you hold a private key, which is safer than a password. 14 min Beginner Lab 03 Up next Create a non-root sudo user A non-root sudo user does daily work with limited rights and uses sudo only for admin commands, which limits the damage a mistake or a stolen session can do. 12 min Beginner Lab 11 Up next What is SSH and how does it work on a server SSH (Secure Shell) is a protocol that gives you an encrypted command line on a remote machine, usually over port 22. 14 min Beginner Diagram 16 Up next Copy files to a server with scp and rsync scp and rsync copy files between your computer and a server over SSH, and rsync only sends what changed. 14 min Beginner 19 Up next SSH config file shortcuts The SSH config file stores per-host settings such as user, port and key, so a short alias replaces a long ssh command. 12 min Beginner
Lock it down
The first hour on a new box: firewall, updates and SSH hardening.
04 Up next Set up a firewall with ufw A firewall decides which network connections may reach your server; ufw is Ubuntu's simple front end for it. 12 min Beginner Lab 05 Up next Keep an Ubuntu server updated automatically Unattended-upgrades installs security updates on Ubuntu automatically, so known vulnerabilities do not wait for you to log in. 12 min Beginner 06 Up next Linux file permissions explained Linux file permissions control who may read, write or execute each file, set separately for the owner, the group and everyone else. 14 min Beginner 12 Up next Initial server setup checklist for Ubuntu An initial server setup is a short, ordered list of safety steps you run once on a new Ubuntu server before you put anything on it. 20 min Beginner 13 Up next Disable SSH password login on Ubuntu Disabling SSH password login makes the server accept only key-based logins, which blocks password guessing attacks. 15 min Intermediate 14 Up next Protect SSH with fail2ban on Ubuntu fail2ban watches log files for repeated failed logins and temporarily bans the offending IP addresses with firewall rules. 14 min Beginner
Everyday Linux
The commands you reach for when something looks off.
07 Up next Essential Linux commands for servers A handful of shell commands, such as ls, cd, cat, cp, grep and man, cover most day to day work on a Linux server. 16 min Beginner 08 Up next Check disk, memory and CPU usage Commands like df, free and top show how much disk, memory and CPU a Linux server is using, so you can spot problems early. 12 min Beginner Lab 09 Up next Read logs with journalctl journalctl reads the logs that systemd collects from the system and from every service, in one searchable place. 12 min Beginner 18 Up next Find what is using a port on Linux To find what is using a port, list listening sockets with ss or lsof and read the process name and ID next to the port. 12 min Beginner
Services and schedules
Keep programs running, run jobs on a timer and give memory room.
10 Up next Run a service with systemd systemd is the service manager on most Linux servers, and a unit file tells it how to start, stop and restart your program. 18 min Beginner 15 Up next Add swap space on Ubuntu Swap is disk space the kernel uses as overflow memory when RAM is full, which can stop small servers from killing processes. 14 min Beginner 17 Up next Schedule tasks with cron on Linux cron is a Linux scheduler that runs commands at set times, configured per user in a file called a crontab. 16 min Beginner