Skip to main content

Command Palette

Search for a command to run...

Your First Ubuntu Server: A Beginner Home Lab Project

A Zero Trust Threads Foundations Guide to Linux Virtualization

Updated
5 min readView as Markdown
Your First Ubuntu Server: A Beginner Home Lab Project
Z
Zero Trust Threads is a cybersecurity media and lifestyle brand focused on making cybersecurity, Linux, networking, GRC, and tech culture approachable through practical projects, real-world learning, and a little humor. Trust nothing. Learn everything.

In the previous article, we prepared your physical computer (the Host) by installing a hypervisor—either VirtualBox for Windows/Linux hosts or UTM for macOS. Now, it's time to build your first virtual machine (the Guest).

We are going to build a Linux server. Specifically, Ubuntu Server.

Why Ubuntu Server? It is an industry standard, heavily documented, and incredibly stable. More importantly, we are using the Server edition, which does not have a Graphical User Interface (GUI). You will interact with it entirely through the command line. While this might sound intimidating, shedding the GUI means the VM requires significantly fewer resources from your Host, and it forces you to learn the command-line fundamentals essential for cybersecurity and system administration.

Let's build your first lab machine.

Step 1: Download the Ubuntu Server ISO

An ISO file is essentially a digital version of an installation CD or DVD. You need to download the official Ubuntu Server ISO to install the operating system inside your hypervisor.

  1. Navigate to the Official Ubuntu Server Download Page.

  2. Windows, Linux, and Intel Mac Users (VirtualBox): Download the standard Ubuntu Server LTS (Long Term Support) image. This will be an amd64 (x86 architecture) file.

  3. Apple Silicon Mac Users (UTM): You cannot use the standard image on an M-series chip. You must download the Ubuntu Server for ARM version. (Look for the arm64 ISO on the download page).

Security Reminder: Only download ISO files directly from the official developer's website. Never use third-party mirrors.

Step 2: Create the Virtual Machine

The exact buttons will differ slightly between VirtualBox and UTM, but the core process is identical. Open your hypervisor and click New VM.

Configure the VM with these baseline settings:

  • Name: Give it a clear name (e.g., Ubuntu-Server-01).

  • Operating System: Select Linux / Ubuntu.

  • Memory (RAM): Allocate 2048 MB (2 GB). Because there is no GUI, 2 GB is more than enough for basic tasks.

  • Storage: Create a virtual hard drive of 20 GB. (This is dynamic; it won't actually take up 20 GB on your Host immediately).

  • CD/DVD Drive: Attach the Ubuntu Server .iso file you just downloaded to the virtual CD drive.

Save the configuration and power on the Virtual Machine.

Step 3: Installation and User Setup

When the VM boots, you will see a text-based installation menu. Use your keyboard's arrow keys to navigate and the Enter key to select. Most of the default settings are perfectly fine for a beginner lab, but pay close attention to these specific steps:

  1. Network Connections: Leave this as the default (usually NAT or Shared Network). This allows your Guest VM to share your Host's internet connection so it can download updates.

  2. Profile Setup (Crucial): You will be asked to create a username and password.

    • Do not use "root" as your username.

    • Create a standard user (e.g., labadmin).

    • Linux uses a principle of least privilege. You will log in as this standard user and only invoke administrative privileges when necessary using the sudo command.

  3. SSH Setup (Crucial): The installer will ask if you want to Install OpenSSH server. Check this box (usually by pressing the Spacebar). This is vital for managing the server later.

Once the installation finishes, the system will prompt you to reboot. It will also tell you to "remove the installation medium"—the hypervisor usually handles this automatically, so just press Enter.

Step 4: First Boot and Running Updates

When the system reboots, you will be greeted by a black screen and a login prompt: Ubuntu-Server-01 login:.

Type your username, hit Enter, type your password (the characters will not show up on the screen for security reasons), and hit Enter again.

You are now logged into a live Linux server. Before doing anything else, you must update it. Cybersecurity starts with patching. Type the following command and press Enter:

sudo apt update && sudo apt upgrade -y
  • sudo: Tells the system to execute the command with "Superuser" (administrative) privileges. It will ask for your password.

  • apt update: Fetches the latest list of available software updates from Ubuntu's servers.

  • &&: Tells the system to run the next command immediately after the first one finishes successfully.

  • apt upgrade -y: Actually installs the downloaded updates. The -y flag automatically answers "yes" to any confirmation prompts.

Let this process run. Once it finishes, your server is secure and up to date.

Step 5: Connecting via SSH

Right now, you are typing directly into the hypervisor window. In the real world, servers live in data centers without monitors attached. Administrators control them remotely using SSH (Secure Shell). Let's practice that.

First, find your VM's IP address by typing:

ip a

Look for a sequence of numbers under your active network interface (usually starting with 10.x.x.x or 192.168.x.x). Write this number down.

Now, leave the VM running, but minimize the hypervisor window. Open the standard terminal on your Host computer (Terminal on macOS/Linux, or PowerShell on Windows).

Type the following command, replacing username with the user you created, and IP_ADDRESS with the number you just found:

ssh username@IP_ADDRESS

Your Host computer will warn you that the "authenticity of the host can't be established" because it's the first time you are connecting. Type yes and hit Enter. Input your VM's password.

Your Host's terminal prompt will change. You are now securely controlling your virtual Linux server remotely from your main operating system!

Next Steps

You have successfully built a virtual machine, installed a server-grade OS, managed user privileges, applied security patches, and connected remotely via SSH.

Right now, your server is a blank canvas. In [Article 18: What Should You Actually Do in a Cybersecurity Home Lab? (Link Placeholder)], we are going to discuss how to turn this blank server into an actual learning environment, rather than just collecting idle virtual machines.

References & Primary Documentation:

Home Lab Series

Part 2 of 5

A growing, beginner-friendly guide to building and expanding your cybersecurity home lab. This series starts with the absolute basics, setting up virtual machines and configuring secure Linux servers and continuously scales into network analysis, automation, and practical security projects. Designed for hands-on learning, these guides help you build real-world system administration and defense skills using the hardware you already own.

Up next

What Should You Actually Do in a Cybersecurity Home Lab?

A Zero Trust Threads Foundations Guide to Intentional Learning