Installing ubuntu on virtualbox or similar
Introduction
These notes are from memory, so they may be out of order.
Steps
- Download the iso from ubuntu.com
-
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
-
Install prerequieites
sudo apt install -yf -
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 -
restart to apply group changes
Guest installation
-
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
- go to drives
- add the ubuntu disk image you downloaded previously in the disk manager
- 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
-
install ssh
sudo apt install -y openssh-server cat /media/share/id_ed25519.pub >> .ssh/authorized_keys sudo ufw allow ssh sudo ufw enable