Getting started with Linux on your first Ubuntu server
🎯 Introduction
Uploading code to a server is only the beginning. You also need to keep the program running, make its endpoints accessible, and find logs when something goes wrong. This course starts with your first Linux login and ends with deploying a Node.js HTTP service. It assumes no prior Linux experience and includes a complete example application.
🧱 What are Linux and Ubuntu?
An operating system manages a computer's processor, memory, disks, and network so applications can read files, write files, and run code. Windows, macOS, and Ubuntu are operating systems. Strictly speaking, Linux is the kernel: the core that manages these resources directly. Packaging the Linux kernel with common tools and a way to install software produces a Linux distribution.
| Distribution | What to know |
|---|---|
| Ubuntu | Based on Debian, with regularly released long-term support versions. This course uses Ubuntu Server 24.04 LTS. |
| Debian | An independent distribution that uses APT to manage packages. |
| Rocky Linux | Compatible with the Red Hat Enterprise Linux ecosystem; commonly uses DNF to manage packages. |
Commands such as cd generally work across these environments, but package names, default settings, and management tools differ. Ubuntu Server typically provides a text-based login, and remote administration also relies mainly on the command line.
🛠 Prepare Ubuntu Server
A cloud server is the recommended starting point. Create an Ubuntu Server 24.04 LTS instance, configure an SSH key, and record its public IP address and login username. In the cloud security group's inbound rules, allow SSH on 22/tcp only from your own public IP address. SSH and file transfers
To practice on your own computer first, create an Ubuntu Server 24.04 LTS virtual machine. Allocate 2 CPU cores, 4 GB of memory, and a 25 GB virtual disk. An ISO is a disk image used to boot the Ubuntu installer. Ubuntu Server system requirements
- On a Windows computer with an Intel or AMD processor, create a Linux virtual machine in VirtualBox and load the AMD64 ISO. NAT networking lets the virtual machine access the internet through Windows. To connect over SSH from Windows later, configure NAT port forwarding from the host's
127.0.0.1:2222to port22on the virtual machine, then connect withssh -p 2222 username@127.0.0.1. AMD64 ISO · Create a VirtualBox virtual machine · NAT port forwarding - On a Mac, use UTM, select
VirtualizeandLinux, and load the appropriate ISO. Choose ARM64 for Apple silicon or AMD64 for Intel processors. Use shared networking; you can then connect from your Mac to the virtual machine's IP address. ARM64 ISO · AMD64 ISO · UTM installation guide
For either virtual machine, select the new virtual disk in the installer, create a regular user, and select OpenSSH Server for remote access later. Eject the ISO and restart after installation. Ubuntu installation instructions
🧰 Log in and run your first commands
Log in to a cloud server using SSH, or use the console if the provider offers browser-based SSH. In a virtual machine, log in through its window using the account created during installation. Password input usually displays no characters. When finished, press ↩ Return on a Mac keyboard.
The terminal displays text and accepts input; the shell interprets your commands. Bash is a common shell for regular Ubuntu users. In a prompt such as learner@linux-lab:~$, $ indicates that the shell is waiting for input. Copy course code blocks starting with the command itself.
whoami
hostname
pwd
cat /etc/os-release
These four commands display your username, hostname, current directory, and operating system version, respectively. Expect pwd to show a path such as /home/learner and the version information to include VERSION_ID="24.04". When both local and server terminals are open, use hostname to check which machine will run your commands.
| Stage | What you will be able to do |
|---|---|
| Linux basics | Organize project files, edit and search logs, manage permissions, and connect to a server from your computer. |
| Linux server administration | Install Node.js, manage processes and systemd services, and inspect system resources and service logs. |
| Shell scripting and server practice | Write health checks and scheduled tasks, and configure basic security. |
❓ Knowledge check
Q1: Why do I need Ubuntu if I already have a local terminal?
Your local terminal can initiate a remote connection. The course's APT, systemd, and Linux port inspection commands run on Ubuntu after you log in.
Q2: Do I need to buy a cloud server to complete the course?
A virtual machine supports the command exercises, deployment, and troubleshooting scenarios. A cloud server also lets you practice connecting through a public address and configuring cloud security groups.
🧪 Exercise
Log back in to Ubuntu using the same method. Run whoami, hostname, and cat /etc/os-release, and record the username, hostname, and version. Confirm that the hostname belongs to your practice machine and the version is 24.04.
🎉 You can now access your Linux server and verify your working environment!
