Installing ubuntu on virtualbox or similar


Introduction

These notes are from memory, so they may be out of order.

Steps

  1. Download the iso from ubuntu.com
  2. Download the most recent virtualbox and install

    sudo dpkg -i <path-to-deb-file>
    

    This will not complete until you install all the prerequisites, but will indicate missing dependencies so the next step can complete

  3. Install prerequieites

    sudo apt install -yf
    
  4. ensure you are a member of the vboxusers and vboxsf groups ^[https://www.virtualbox.org/manual/ch03.html#usb-implementation-notes]

    sudo groupadd vboxusers 
    sudo usermod -aG vboxusers $USER 
    sudo groupadd vboxsf
    sudo usermod -aG vboxsf $USER 
    
  5. restart to apply group changes

Guest installation

  1. Create a new virtual machine

    • type: linux (64-bit)
    • specific type: ubuntu 2X
    • RAM: 2-8 Gb
    • processors: 1
    • networking: switch to "bridged" networking mode
    • share folder: create & select a folder in your users directory

      • permanent: y
      • auto-mount: y
    • Add iso media

      1. go to drives
      2. add the ubuntu disk image you downloaded previously in the disk manager
      3. select the disk image
    • Start the machine
    • once ubnutu boots to the terminal. indicate "try or install ubuntu"
    • proceed to the installation wizard
    • select your keyboard
    • select your time zone
    • select wipe and reinstall ubuntu
    • once it finishes, proceed with the installation. This should take ~10 min
    • Let the machine restart
    • install guest additions
1. start the vm and update the machine

    ```bash
    sudo apt update && sudo apt upgrade -y
    ```

1. install prerequisites

    ```bash
    sudo apt install -y gcc make perl build-essential
    ```

1. Install the virtualbox guest additions cd from the guest os window and select run when the button pops up.
1. let it run
1. eject the cd from the virtualbox host menu

Optional Steps

  1. install ssh

    sudo apt install -y openssh-server
    cat /media/share/id_ed25519.pub >> .ssh/authorized_keys
    sudo ufw allow ssh
    sudo ufw enable 
    

About

I am an engineer and educator, having spent ten years as a professor. My goal is to help you build your knowledge of design and technology, get your hardware working, and propel your startup or small business. Get in touch!

Read More