https://www.virtualbox.org/wiki/Downloads Choose the version for the host machine, so if you’re on Windows, choose that, if Mac, choose that.
!IMPORTANT: On Windows, run the install for Virtualbox as Admin, if you do not network drivers for the VM won't be installed and VM's won't be able to connect to the internet.
Or whatever flavor you like, I recommend this one. https://ubuntu.com/download/server
Click the “New” Icon
- Give the machine a name
- Type: Linux
- Version: Ubuntu 64
Next
Memory Size If you have 16GB or more RAM, I recommend giving it 4000MB of RAM. If you have less, 2000MB should be fine
Hard Disk Default option is fine
Hard disk file type Default option is fine
Storage on physical disk Default option is fine
File location and size Location is up to you, optimally the virtual disk is stored on an SSD The size depends on how much free space you have, running out of space is rough, it usually means you’ll have to create a new machine, unless you can get rid of a bunch of stuff. Expanding the disk storage of an existing VM is painful, I’ve looked it up a few times and each time starting from scratch was more appealing.
Minimum 50GB, I feel more comfortable with 100 or 150GB
There’s a choice here. There’s a “Host Only” feature (what I recommend), or “Bridged”.
“Host-only” means only your computer can see it, the network router and other computers on the local area network your on can’t see it. Since it’s locked off it’s a bit more secure.
“Bridged” means the Linux VM will show up like it’s another physical machine on the network. This is less secure, but can be useful if you want to test something from your phone, the phone will have a chance of seeing the the Linux VM, but there’ll may need to be host hacking on the router level to get that to work.
You could have both and keep the “Bridged” adapter off unless you’re using it.
Select the VM you’ve made Click Settings (alternatively Machine > Settings works)
On the left side select Network
Leave Adapter 1 alone
Select Adapter 2
- Select: Enable Network Adapter
- Select “Host-only” (or “Bridged” if you prefer, see preface)
- Leave the default “Name:” that comes up
Press OK
Select your machine and press the “Start” icon
It will prompt you for a startup disk
Press the folder icon and find the *.iso
Ubuntu server install file you downloaded
Install Linux as normal Fill all options you’re prompted to, everything can be left on the default I typically don’t install any packages recommended from the end of the install process
See: the next doc Setting up a Linux box for local dev