Linux on Windows 10 is Awesome

gravonw10.PNG

I’m doing some web site work at the moment for Connected Humber. In the process I found about about Grav, which is another nice way to make static web sites that are simple to host, even on sites like GitHub.

I thought it might be nice to have Grav on my machine so I could play with it. Only problem is that it really needs to run on a Linux box. A while ago I mentioned how easy it is to get a Linux box running in the cloud with Azure. It turns out it is even easier to get Linux on a Windows 10 device using the Windows Subsystem for Linux. This procedure here is a good start, but I used this one because it also covers the installation of lots of tools that you will want to use.

Now, to be clear, the Windows Subsystem for Linux (WSL) is not the same as running Linux on your computer. It is also not the same as a virtual machine running Linux. You start it running and you instantly get a shell command prompt that you use to talk to you “Linux” installation which is really just a process on your Windows PC. There is no graphical interface (unless you are prepared to do a lot of fiddling about) and you would never use this in production. But it is fantastic for development.

You can install all your favourite Linux tools and they will just work. All your Windows drives are mapped into the WSL environment. Network connections just work. You can host websites and services locally and then hit against them from Windows programs and browsers. There is even a plugin for Visual Studio Code that lets you write the code on your PC and then deploy and test it on your WSL.

It has always annoyed me that sometimes I have to scrabble around for a Windows version of a tool that is readily available for Linux. However, with WSL I can just install and use it. In no time at all I had Apache2, PHP and all the underpinnings needed to run Grav. And after a bit of fiddling around with the apache2.conf file I had it running. The lack of a Linux windowed environment is not a problem for me at the moment. Lots of tools, such as Grav and NodeRed (which also works great) are used from the browser, which works a treat.

I’ve been using the Unix command prompt for longer than I’ve been using Windows (what with Windows not having been invented when I started). It’s really nice to be able to use those commands again on my Windows box.

If you want to learn Linux, you should install this and start playing. It’s awesome.