- Install Sublime Text editor: http://tipsonubuntu.com/2017/05/30/install-sublime-text-3-ubuntu-16-04-official-way/
-
-
Save 33eyes/53471806210506fdbd32c80d59ff63b0 to your computer and use it in GitHub Desktop.
Note: After many of the steps below, at least the virtual machine needs to be restarted, and sometimes I had to restart VirtualBox and the host machine. So it's a good idea to restart the VM often, and if some setup changes didn't go through etc, try to restart VM/VirtualBox/host machine first when troubleshooting.
Another note: The setup/istallation steps can vary greatly depending on host machine hardware/OS/network. The steps outlined here won't work for every possible case.
-
Download VirtualBox (it's free)
-
Install VirtualBox - install it just like a regular application, just follow the prompts in the installation wizard.
-
Download an .iso of whatever Ubuntu version you need. I had to use a 32-bit version of Ubuntu, because while my laptop is 64-bit and runs 64-bit Windows OS, it has old hardware that can't support a 64-bit virtual machine (https://askubuntu.com/questions/675251/virtualbox-has-no-64-bit-options). I went with Ubuntu 17.04 (Zesty) 32-bit Desktop version, and got it here: http://mirror.pnl.gov/releases/zesty/ .
-
Create a new virtual machine, configure it for Ubuntu, and install Ubuntu on it:
Note: Change the 10MB hard disk space limit to something larger, the 10MB default setting will probably be too small, and it's harder to change it later.- follow one/all of the guides in the top answers here: https://askubuntu.com/questions/142549/how-to-install-ubuntu-on-virtualbox
- or this guide: http://www.psychocats.net/ubuntu/virtualbox
- use the last step on this guide to make sure that you're not continuing to boot from the iso file.
-
Install guest additions
- you may have already done this in step 4 when following the installation guides
- if not, then in your Ubuntu guest top menu, click Devices > Insert Guest Additions CD Image..
- this should easily install the guest additions from a virtual CD image that came with Ubuntu.
- troubleshooting: https://superuser.com/questions/1268741/virtualbox-ubuntu-guest-additions-not-installing-modprobe-vboxsf-failed
- guest additions are mostly needed for better graphics and shared folders, and are not required.
-
Set up shared clipboard and file drag & drop
- shut down the virtual machine, and click on Settings for that machine
- in the General tab, go to Advanced
- select Bidirectional for Clipboard and Drag & Drop
- now you should be able to copy/paste between the host and guest machines, and also drag & drop files between them.
-
Set up the network/internet (if it's not working as it should already)
- this can be tricky, and I got stuck here for a bit.
- I had the Ubuntu guest network adapter set to NAT (which was the default)
- Make sure that the network adapter is enabled:
- shut down the VM and go to its Settings > Network
- make sure that
Enable Network Adapter
checkbox is checked, and thatAttached to:
drop-down is set to NAT.
- Make sure that the network adapter is connected:
- in the Ubuntu guest top menu, click Devices > Network > Connect Network Adapter
- source: https://askubuntu.com/questions/487114/internet-isnt-working-in-ubuntu-14-04-as-virtualbox-guest-os (the answer with the screenshot was helpful here).
-
Set up DNS service on your Ubuntu guest
- Run the following commands in Ubuntu guest terminal:
sudo su echo "nameserver 8.8.4.4" >> /etc/resolv.conf echo "nameserver 8.8.8.8" >> /etc/resolv.conf exit
(source: https://superuser.com/questions/648396/virtualbox-ubuntu-can-not-connect-to-internet)
- to figure out why I couldn't connect to the internet (either by pinging www.google.com in terminal, or trying to reach it on Firefox), I used the following code, and it helped me narrow down the problem to a lack of DNS service setup:
ping -c 3 127.0.0.1 # to local host ping -c 3 192,168.0.24 # to it's own NIC ping -c 3 -R -v 192.168.0.1 # to the gateway, Record route and get verbose ICMP ping -c 3 8.8.8.8 # to numeric IP at google ping -c 3 www.google.com # to google through dns
Other references I used: