Creating and Connecting to Your First Linux Server
Spin up an Ubuntu 24.04 Linux server in the cloud, configure SSH key authentication, and learn to navigate your new server. This exercise uses DigitalOcean but the steps work with any cloud provider.
Need a server? Get $200 free credits on DigitalOcean- A computer with a terminal (macOS, Linux, or Windows with WSL)
- A cloud server (we use DigitalOcean in this exercise, but any Ubuntu 24.04 server works)
- Basic familiarity with typing commands in a terminal
You need a Linux server to follow along. Any cloud provider works, but we recommend DigitalOcean for its simple interface and fast setup.
Get $200 in free credits to get started.
Disclosure: This is an affiliate link. We may earn a commission at no extra cost to you.
- Create a cloud Linux server running Ubuntu 24.04
- Generate and configure SSH keys for secure access
- Connect to a remote server via SSH
- Navigate the Linux filesystem and run basic commands
- Understand the difference between root and regular user access
Generate an SSH Key Pair
Before creating a server, generate an SSH key pair on your local machine. This lets you log in securely without a password.
Create an Ubuntu 24.04 Droplet
Log in to DigitalOcean, add your SSH public key, and create a new droplet. Choose Ubuntu 24.04 LTS as the image. A Basic plan with 1 GB RAM and 1 vCPU ($6/month) is enough for learning. Pick the datacenter region closest to you.
Connect to Your Server via SSH
Use SSH to connect to your new droplet. Replace the IP address below with the one shown in your DigitalOcean dashboard.
Explore Your Server
Run some basic commands to understand what you are working with. Check the OS version, available resources, and disk space.
Navigate the Linux Filesystem
Learn to move around the filesystem, list files, and understand the directory structure of a Linux server.
Update the System Packages
Always update your server packages right after creating it. This ensures you have the latest security patches.
Install Essential Tools
Install a few commonly used tools that are not included by default. These will be useful throughout the rest of this series.
Found an issue?
Series:Linux Server Setup SeriesPart 1 of 5
More exercises
Linux
Securing Your Linux Server: Essential First Steps
Harden a fresh Ubuntu 24.04 server by creating a non-root user, locking down SSH, configuring a firewall with UFW, and setting up fail2ban to block brute-force attacks.
45 minutes
Terraform
Deploy a DigitalOcean Droplet with Terraform
Learn Infrastructure as Code basics by deploying a simple web server on DigitalOcean using Terraform. Perfect for beginners starting their IaC journey.
60 minutes
Linux
Running Docker Containers on Your Linux Server
Install Docker and Docker Compose on Ubuntu, run your first container, deploy a WordPress stack with docker-compose, and set up Nginx as a reverse proxy in front of your containers.
60 minutes
Also worth your time on this topic
Securing Your Linux Server: Essential First Steps
Harden a fresh Ubuntu 24.04 server by creating a non-root user, locking down SSH, configuring a firewall with UFW, and setting up fail2ban to block brute-force attacks.
45 minutes
What do PTY and TTY Mean?
TTY and PTY are interfaces for text input and output in Unix systems. Learn the difference between physical terminals (TTY), pseudo-terminals (PTY), and how they enable SSH sessions, terminal emulators, and command-line tools.
SSH Basics and Key Authentication
How does SSH key authentication work? How do you set it up?
junior