Coder Radio listeners who already caught Monday’s show will know that I have been playing around with Bash on Windows. To be specific I was using the Ubuntu “app” available on the Windows Store and made not modifications to it or my system.
The experience of just getting it installed is pretty terrible. You have to join the Windows Insider program and after you’ve done that restart your computer a number of times until Windows Update notices that you’re in the program and picks up the required update. There’s no direct command line script you can for this you just restart, restart, and restart… until… eventually… it works. Having spent a lot of time in UNIX-like environments, I’ve gotten used to things be a little more precise than “restart and pray.”
Once it got the Windows Insider issue sorted out and installed the Ubuntu “app” from the Windows Store, I started messing around with the BASH interface. On the whole, it functions like a real BASH interface and the commands you’ve been using on Linux / macOS will work just fine. However, that was pretty much the end of my enjoying the experience. Like many things in technology my primary issue is one of expectations. I expected to simply be able to open a BASH window that would start in my home directory and be able to interoperate easily with the local Windows file system. This is not how BASH on Windows works. The Linux file system is separated into an obscure section of the hard disk, making even the simplest tasks of working between the Linux systems and Windows needlessly challenging. From a practical perspective what I wanted to be able to do was edit some code using Visual Studio Code somewhere in my ‘Documents’ directory and run BASH commands against that code easily.
Because I am doing a lot of work that crosses into the legacy Windows world, I really wanted this to work and find it particularly disappointing because other Microsoft tools (Azure, VS Code, and Typescript) have proven to be surprisingly useful for my latest efforts. It would have saved me a ton of headaches. However, it’s just not ready for prime time yet. Ultimately, if you’re working in a Windows environment you’re still better off with just learning Powershell or using something like Cygwin. Let me know what you think on Twitter or in the comments. Also, heard of Docker Compose but not sure what it’s all about? Checkout my quick explainer here.