Overview
There are several scenarios where you might run a server. In cases like cloud providers (e.g. Digital Ocean, Microsoft Azure, Amazon AWS, etc) - you typically just choose an OS option, and you get access to a server that is already installed.
However, if you are working on some hypervisors (e.g. ESXi, ProxMox, Microsoft Hyper-V Server, etc), or if you are installing Linux on bare metal (e.g. a physical computer) - you will need to install the operating system from scratch.
This page serves as a guide on how to install Ubuntu Linux (version 21.04, as of this writing), and explains what options you have during the install.
Downloading an ISO
An .iso
file is basically like a disc image. You can think of it like the contents of a DVD or a CD, but in a single file format. How this works is that you boot from these ISO files, and what ensues is an installer that walks you through the installation. To download the latest Ubuntu Server, navigate here:
From this screen, as of this writing, choose: “Manual Server Installation”
Tip:
You will have the option to download a Long Term Support (LTS) version, or the very latest version. The LTS version is considered a very stable release, where there will be widespread support by vendors, and layered products that you might install.
Conversely, if you install the very latest, some vendors won’t fully support it yet. Or, you may go to install software, and it won’t have support for your version of software.
As a general rule, install the the most-recent “LTS” version that is available.
Creating Physical Media
If you are installing Linux on a physical computer, you will probably want to boot from a DVD or USB thumb drive.
Creating a DVD Disc
The easiest of these methods is to create a bootable DVD. This requires a few things:
- Your workstation, where you downloaded the
.iso
file, must have a DVD writer drive. You can buy portable USB devices like this at office supply stores. - You must have a writable DVD. You can buy these are office supply stores.
- The server where Linux will be installed, must have a DVD drive, or you could use a USB, portable DVD drive.
This is called the easiest option because all you need to do is right-click on the .iso
file, and choose “Burn disc image”:
Creating a USB Thumb Drive (on Windows)
To create a bootable USB thumb drive you’ll need an external tool. There are a few that will do the job, but we’ll recommend Rufus:
You can install the “portable” version. That is basically just a standalone .exe
that doesn’t need an installer. Download the file and run it. It will give you a User Access Control (UAC) prompt in Windows:
Then, in the main window: point to your .iso
file and point to your USB drive:
Click “Start” and it will overwrite your USB device with the contents of the .iso
file.
Creating a USB Thumb Drive (on macOS or Linux)
To create a bootable URB thumb drive, your best option is to use dd
. The syntax is something like this:
1
sudo dd if=./input of=./output status=progress
In this case, let’s assume the input file is an .iso
file in your ~/Downloads
folder, and your output is your USB thumb drive. You should be able to discern what the device name is from lsblk
and/or lsusb
. Assuming your thumb drive might be /dev/sdb
, your command might be:
1
2
# WARNING: This is an example, make sure this is correct for your system.
#sudo dd if=~/Downloads/ubuntu-21.04-live-server-amd64.iso of=/dev/sdb status=progress
Installation Steps
Put your installation media (the virtual .iso
file, or the physical DVD, or USB device) into the machine. Then, boot the machine:
Step 1: Launch screen
Hit Enter.
Step 2: Choose a language
Choose a language and then hit Enter.
Step 3: Update the installer
You don’t need to, but if you have network access then you can Tab down to Update, or just Continue, then hit Enter.
Step 4: Keyboard configuration
Hit Enter.
Step 5: Network configuration
Unless you have some custom setup, you can just hit Enter.
Step 6: Proxy server
A proxy server is typically only used in a corporate environment. It’s a server that you must traverse through, to get out to the internet. In most cases, this is not used.
Hit Enter.
Step 7: Installation mirror
For updates and additional files, the installer may need to find source files. These are typically installed on many “mirrors” across the internet, unless you’ve set up your own, local Ubuntu mirrors.
In just about all cases, you can just hit Enter.
Step 8: Disk configuration
There are many complex scenarios you may explore in the future, including encrypting your disk. However, in most cases you can just hit Enter.
Step 9: Disk confirmation
Hit Enter. Then you will see a confirmation:
Tab to “Continue” and then hit Enter.
Step 10: Create an account
This step will create a non-privileged user that has “sudo” access. Unless this is a personal account for you, personally, this could be a generic account. For example, consider sysadmin
or operations
as the name and username. The server name is the name as it will appear on the network.
Tab down to "Done", then hit Enter.
Step 11: Install SSH Server
Hit the Space bar to select “Install OpenSSH server”. Tab down to “Done”, then hit Enter. Note that if you use LaunchPad for SSH keys, you can import your workstation SSH keys so that you’ll automatically be able to log in from all of your regular workstations.
Step 12: Install optional software
You don’t need to install anything from here. You can install whatever you need later, once the OS is installed.
Tab down to “Done”, then hit Enter.
Step 13: Installation progress
You will now see some status and progress as the operating system is installed on your computer.
Step 14: System Update
The installer will then check for updates and patches, and install those. Ideally, let this continue. Later, consider reviewing Patching and Updating Ubuntu.
Step 15: Reboot
When complete, you will be prompted to reboot. Tab down to “Reboot Now”, then hit Enter.
Step 16: Initial Login
After the reboot, this is the default screen for the server. Log in with the credentials you specified back in Step 10: Create an account.
Step 17: Post-Login
Once logged in, you are now at a “Bash” prompt and can begin configuring your system.