How to Install Ubuntu Server on VirtualBox

Step 1: Download and Install VirtualBox

  1. Download VirtualBox: Go to the VirtualBox download page and download the version suitable for your operating system.
  2. Install VirtualBox: Follow the installation instructions for your operating system.

Step 2: Download Ubuntu Server ISO

  1. Download Ubuntu Server: Go to the Ubuntu Server download page and download the ISO file.

Step 3: Create a New Virtual Machine

  1. Open VirtualBox and click on “New” to create a new virtual machine.
  2. Name and Operating System:
    • Name: Enter a name for your virtual machine (e.g., “Ubuntu Server”).
    • Type: Select “Linux”.
    • Version: Select “Ubuntu (64-bit)”.
  3. 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.
  4. Hard Disk:
    • Select “Create a virtual hard disk now”.
    • Click “Create”.
  5. Hard Disk File Type:
    • Select “VDI (VirtualBox Disk Image)”.
    • Click “Next”.
  6. Storage on Physical Hard Disk:
    • Select “Dynamically allocated”.
    • Click “Next”.
  7. File Location and Size:
    • Choose the size of the virtual hard disk (e.g., 20 GB).
    • Click “Create”.

Step 4: Configure the Virtual Machine

  1. Select the Virtual Machine: In the VirtualBox Manager, select the virtual machine you just created.
  2. 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

  1. Start the Virtual Machine: Select the virtual machine and click “Start”.
  2. Boot from ISO: The virtual machine will boot from the Ubuntu Server ISO.
  3. Language Selection: Select your preferred language and press Enter.
  4. Keyboard Configuration: Select your keyboard layout and press Enter.
  5. Network Configuration: The installer will attempt to configure the network. If it succeeds, it will show the obtained IP address.
  6. Configure Proxy: If you use a proxy, configure it here. Otherwise, leave it blank and press Enter.
  7. Configure Ubuntu Archive Mirror: Select the mirror closest to your location and press Enter.
  8. 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.
  9. Profile Setup:
    • Enter your name, server name, username, and password.
    • Choose whether to encrypt your home directory.
  10. SSH Setup: Choose whether to install the OpenSSH server.
  11. Featured Server Snaps: Choose whether to install any featured server snaps.
  12. 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

  1. 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.
  2. Login: Log in with the username and password you created during the installation.

Step 7: Update and Upgrade

  1. Update Package List:
    sudo apt update
  2. 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

Write a Reply or Comment

Your email address will not be published. Required fields are marked *