Its nice to have a safe environment to play around with something new, do some testing or work on a project keeping without causing conflicts with others. Using a Virtual Machine keeps everything separated from your host machine so it minimises any risk. A Virtual Machine is an emulation of a computer system, so its basically one operating system running on another.
There are a few Virtualisation applications available but the one I use is VirtualBox. It can be downloaded here for your platform of choice and is free. Download and install the application version. When you open it it will look something like this.
Getting an Operating System to use
Now that VirtualBox is installed it wont do much until we download a operating system to run on it. There are many great free operating systems to choose. Ubuntu is a Linux operating system that is very popular and very free. New versions of Ubuntu are released regularly with the LTS (long-term support) versions receiving updates for a longer period of time. These versions are preferred. You can download the latest LTS version of Ubuntu from here it will be an ISO file format. These are compatible with VirtualBox. At the time of writing the latest LTS release is 16.04.3.
Installing Ubuntu in VirtualBox
Open VirtualBox and click on New. The images below will guide you through the setup process for our Ubuntu installation.
We are now ready to boot the Virtual Machine and install Ubuntu from the ISO we inserted into the Virtual Optical Drive.
Installing Guest Additions
Installing the Guest Additions enables extra features that are already built into VirtualBox. These include:
- automatic resizing
- seamless mode
- the bidirectional clipboard
- drag and drop
- better performance
With the Virtual Machine running select the VirtualBox Devices menu and select Insert Guest Additions CD Image.
At this point you have a fully operational Virtual Machine running Ubuntu. You can then begin the setup process for whatever development technologies you are going to be using. If you are not familiar with Ubuntu then take some time to use the OS and get used to where everything is.
If you want to get Rbenv, Ruby and Rails setup on your new Ubuntu VM I have a post that goes through the process.