How to Install Ubuntu Server on VirtualBox
January 18, 2025 1:33 pm by
Alex
Step 1: Download and Install VirtualBox
- Download VirtualBox: Go to the VirtualBox download page and download the version suitable for your operating system.
- Install VirtualBox: Follow the installation instructions for your operating system.
Step 2: Download Ubuntu Server ISO
- Download Ubuntu Server: Go to the Ubuntu Server download page and download the ISO file.
Step 3: Create a New Virtual Machine
- Open VirtualBox and click on “New” to create a new virtual machine.
- Name and Operating System:
- Name: Enter a name for your virtual machine (e.g., “Ubuntu Server”).
- Type: Select “Linux”.
- Version: Select “Ubuntu (64-bit)”.
- Memory Size: Allocate memory (RAM) for the virtual machine. A minimum of 1024 MB (1 GB) is required, but I personally recommend at least 4096 MB (4 GB) if your system has enough RAM.
- Hard Disk:
- Select “Create a virtual hard disk now”.
- Click “Create”.
- Hard Disk File Type:
- Select “VDI (VirtualBox Disk Image)”.
- Click “Next”.
- Storage on Physical Hard Disk:
- Select “Dynamically allocated”.
- Click “Next”.
- File Location and Size:
- Choose the size of the virtual hard disk (e.g., 20 GB).
- Click “Create”.
Step 4: Configure the Virtual Machine
- Select the Virtual Machine: In the VirtualBox Manager, select the virtual machine you just created.
- Settings:
- Click on “Settings”.
- Go to the “System” tab and ensure that the “Motherboard” tab has “Enable EFI (special OSes only)” unchecked.
- Go to the “Processor” tab and allocate at least 2 CPUs.
- Go to the “Storage” tab:
- Under “Controller: IDE”, click on “Empty”.
- Click on the disk icon next to “Optical Drive” and select “Choose a disk file…”.
- Browse to the Ubuntu Server ISO file you downloaded and select it.
- Go to the “Network” tab:
- Select “Adapter 1” and ensure it is enabled.
- For “Attached to”, select “Bridged Adapter”.
- In the “Name” dropdown, select the network interface you want to bridge to (e.g., your Ethernet or Wi-Fi adapter).
- Click “OK” to save the settings.
Step 5: Install Ubuntu Server
- Start the Virtual Machine: Select the virtual machine and click “Start”.
- Boot from ISO: The virtual machine will boot from the Ubuntu Server ISO.
- Language Selection: Select your preferred language and press Enter.
- Keyboard Configuration: Select your keyboard layout and press Enter.
- Network Configuration: The installer will attempt to configure the network. If it succeeds, it will show the obtained IP address.
- Configure Proxy: If you use a proxy, configure it here. Otherwise, leave it blank and press Enter.
- Configure Ubuntu Archive Mirror: Select the mirror closest to your location and press Enter.
- Guided Storage Configuration:
- Select “Use An Entire Disk” and press Enter.
- Select the disk to install Ubuntu Server on and press Enter.
- Confirm the disk to be formatted and press Enter.
- Confirm the destruction of data and press Enter.
- Profile Setup:
- Enter your name, server name, username, and password.
- Choose whether to encrypt your home directory.
- SSH Setup: Choose whether to install the OpenSSH server.
- Featured Server Snaps: Choose whether to install any featured server snaps.
- Installation Complete: The installation will begin and may take several minutes. Once complete, you will be prompted to reboot the system.
Step 6: Post-Installation
- Reboot: The system will reboot. You may need to remove the ISO from the virtual optical drive to ensure it boots from the hard disk.
- Login: Log in with the username and password you created during the installation.
Step 7: Update and Upgrade
- Update Package List:
sudo apt update
- Upgrade Packages:
sudo apt upgrade
Congratulations! You have successfully installed Ubuntu Server on VirtualBox
You can now proceed to configure your server as needed.
Comments