Due to performance issues with VirtualBox I’ve swapped out to VMware Player. Read my post Installing Ubuntu in VMware Player on Windows for more info.
The first part of my journey towards learning Node.js – after years working on Microsoft stacks – is to get started with Linux. I know Node has a Windows installer now, but I want to be deploying production sites on Linux, so I need to get used to it.
After far too little research I’ve decided to start off with Ubuntu. It’s pretty widespread and mature, has great support out there in the web, and is available at loads of web hosts.
I don’t want it to be my main OS right now, and I don’t want to get a new machine to put it on, so I’ve gone the Virtual Machine route. Fortunately my laptop is beefy enough to handle it alongside Windows 7 – it’s a Core i7, 8GB RAM with SSD hard drive – the only limiting factor is the size of the drive. Here’s how I’ve got it running.
1: Download Virtual Box
2: Download Ubuntu ISO (just the normal Ubuntu, not Ubuntu Server)
3: Follow these tremendously easy instructions
And KABOOM! Three steps and five minutes later Ubuntu is up and running.### Sharing files between Windows and the Ubuntu VirtualBox
One thing you’re going to want to do to get the most out of this setup, is create a shared folder that both Windows and the Ubuntu virtual can access.
I found various references for how to do this on the web, some worked, some didn’t. This is the process that worked for me – you may not need all of the reboots, but it’s pretty quick to do, so no harm done.
1: Create share in Windows
Create a folder in Windows (or select an existing one)
Right click on the folder and select Properties >> Sharing >> Share
2: Install Guest Additions on Ubuntu
Boot up your Ubuntu virtual machine and log in
From the Devices menu select Install Guest Additions, and select to autorun the program when asked
When the installation has finished, reboot Ubuntu
3: Add the shared folder to Ubuntu / VirtualBox
With Ubuntu running in VirtualBox select Shared Folders from the Devices menu
Click the “+” icon to add a new share, select your folder in Windows and give it a share name. Select both the Automount and Make Permanent options.
Click ok to mount the share to your Ubuntu system in the location /media/sfyour-share-name (eg: the above goes to the location /media/sfWinLinShare)
4: Give yourself access to the share
Finally you need to give your Ubuntu user the permissions to access this folder. The share is created with access granted to the usergroup *vboxsf *so you need to join this group. Open a terminal window and – replacing yourusername with your actual Ubuntu username – type:
sudo usermod -a -G vboxsf yourusername
Reboot Ubuntu and you’ll be able to access your share in /media/sf_your-share-name and easily transfer files between your Windows host system and Ubuntu guest.