Ask HN: How Is Developing on a Linux VM in Windows?
Compared to an actual Linux install.
I'm thinking of a MS Surface Pro and am curious how it would be to do my Linux work in a VM.
I'm thinking of a MS Surface Pro and am curious how it would be to do my Linux work in a VM.
66 comments
[ 3.4 ms ] story [ 126 ms ] threadWindows 10's WSL (Windows Subsystem for Linux) is pretty amazing though. If you're only doing command line stuff, you might be able to get almost everything you want done with that instead. I managed to configure mine to run my tmux and vim configurations, get Ruby running, and install the Ubuntu version of Vagrant to provision some DigitalOcean machines. It all worked relatively easy.
The only stumbling block I ran into is that the Bash shortcut doesn't drop you to a login shell, so my .profile wasn't executing. From Powershell, start bash with --login or append --login to the Bash shortcut, and everything works pretty darn well.
But if you're gonna go the VM route still, just make sure you have tons of RAM. My 4gb Surface doesn't do a horrible job, but after the summer Windows update, I feel the pinch more than I used to.
Hope that helps!
Also, some modern IDE's have Vagrant support natively, which allow you to work transparently in whatever Windows IDE you like, and operate your VM from there.
The experimental Ubuntu bash command prompt in Windows 10 is a great idea, but not quite ready for Rails development. Too many breaking bugs (check the GitHub repo for context)
I eventually gave up on that, and bought a MBP. I still wish I could use Windows for my Dev box, but I just can't recommend it (yet)
But that's an odd use case for most people.
It works pretty well. In particular, and a reason I use VMs at home for my own stuff, being able to make snapshots or very specialized machines is wonderful. In order to facilitate quicker collaboration, we use a common baseline that's easily distributed to new project members, or used to recover a borked image. This also means we have a canonical image to use for building releases.
I can say, I've got a shitty laptop at work and it runs RHEL in VMWare without much difficulty. MS Surface Pro should give you a fine experience.
I started out using virtualbox, which was actually pretty great for me, and I still fall back to it for some projects. I don't develop games or anything, but for the simple task of making and running web & shell software, it works flawlessly.
However, since a lot of my work is remote over ssh anyway, I've been really pleased with Bash on Ubuntu on Windows, and I use that more and more. I thought it sucked at first because of colors, then I realized I can run X server and xterm, and then my shared ssh config and key files work for me out of the box on windows without having to mess around with putty.
I have a free screencast based guide on how to set everything up so you can run both operating systems together seamlessly complete with independent VM windows, clipboard sharing and drag/drop, etc..
Details can be found at: https://nickjanetakis.com/blog/create-an-awesome-linux-devel...
P.S., if you're wondering why I still do this and don't use the Windows Subsystem for Linux, I have another post on that too:
https://nickjanetakis.com/blog/i-almost-rage-bought-a-macboo...
Looks like VMWare Workstation is on sale for $162 today. Might take the plunge.
So for me, as a PHP developer, my page loads time are 5x faster for VMWare compared to Vagrant
As to why I don't use real Linux - at home, I do, but we have products in ASP.NET at work so that's not an option.
I've just been trying it out. Weirdly hyper-v's NAT (which is hidden in from the UI) is super slow
Another option if you use mostly the terminal is to ssh (PuTTy) into a VPS box for development using vim + tmux. That's my fallback when I'm not on my desktop or traveling.
Only disappointment has been my laptop's decreasing stability at the windows level... but I can't blame that on linux or running a VM :D
As I do mostly web dev now, I even install Cloud9 IDE on my VM and now actually edit in the browser. The command line windows in Cloud9 was extremely robust and the editor is very, very good. It will be hard for me to switch back to something else.
I even have Cloud9 on a Digital Ocean droplet for one project which means I don't even need to boot a VM and just log in where I happen to be.
Finally, I settled on a windows 10, a linux guest under vmware with no desktop environnement (an ubuntu server + the Xorg libraries I need), and I just use an X server running under windows (the one from MobaXTerm, but cygwin should be fine too) to display the linux windows apps in my normal MS-Windows environment.
I feel like I have the best of both world, I can use visual studio, unity3d, under windows, and play with my steam library, and for work that needs linux (mostly my server-side developments, but also a non-trivial QT application that I sell for windows and mac, but actually like developping under linux). Thanks to the X Server, the apps running in the linux vm are displayed in Windows as if they were standard windows app.
I do this on all my machines and it works quite well. There's no VM overhead and if you manage to bork one OS, you still have the other one for online research, creating recovery drives etc.
Enough memory and cores on your host is necessary, otherwise it's frustrating. You don't need a beast, but a kitten with absolute minimal specs won't do.
Edit: be sure to set up shared folders between the guest and host, it makes things easier. scp isn't bad either, but it can be a little easier to just plop/copy files in a directory.
I'm very interested in replicating your setup here, so if you have this documented, do you care to share?
Linux 4.10 will also support the improved Type Cover 4, (currently, support is there only up to Type Cover 3/SP3)