What this will get you:
- A true linux shell without Cygwin on Windows. Essentially an SSH server sitting on your desktop which I have found perfect for web development using a powerful editor like vim or emacs + screen.
- Download Virtualbox
- Grab an image of Ubuntu Server
- Install using the wizard
- When you get to the section that allows you to select pre-loaded software, only select OpenSSH. I like using XAMPP to do local PHP development, but if you like you can select LAMPP for a basic stack.
Shutdown your server with:
sudo init 0
In Virtualbox, go the settings for your machine, and find the network tab. Change the first adapter to the following:
Attached to: Bridged Adapter
Name: "Name of main network adapter here"
First run from your Windows host:
ipconfig
Remember the gateway and network mask
Back on the server:
sudo vim /etc/network/interfaces
Then modify the file to look like this:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.100 <-- ip of your choosing
netmask 255.255.255.0 <-- whatever your windows netmask was
network 192.168.1.255
gateway 192.168.1.1 <-- whatever your windows gateway was
The address IP can be whatever you wish so long as it isn't already taken by another adapter on your network.
Restart Ubuntu and you should be good to go.
Windows 7 Hosts files will be here:
C:\Windows\System32\drivers\etc\hosts
Open up that file and add a nice alias to your static IP, I called mine devvy
# bunch of crap
#...
192.168.1.100 devvy
Boom, now devvy
in your browser or SSH client will point to your server!
- In VirtualBox got to Devices, select Install Guest Additions
sudo mount /dev/cdrom /media/cdrom
cd /media/cdrom
sudo ./VBoxLinuxAdditions.run
- Create a new shared folder, select Auto-mount and Make Permanent
- Save any work and
sudo reboot
This will auto-mount the folder just setup in the /media/sf_{folder-name}
directory. Try to navigate to this directory now.
In my case my user did not have access to the folder immediately, so adding your user to the Vbox user should allow you to use the directory
sudo usermod -G vboxsf -a <your-username>
Credits to these fine sources: bulk of guide, permission fix