A Week with Windows 10 and Linux Subsystem for WordPress Development

It’s been 10 years since I switched to Apple, coming from Windows. Having native access to unix tools via the terminal was what initially attracted me to the world of Mac. I recently spent a week on Windows 10 and was surprised how well it worked.

Another Macbook Pro repair, another chance for a clean slate.

My late 2016 edition Macbook Pro has had a number of hardware issues requiring extensive time at an Apple repair facility. Before sending it off for another round of repairs I decided to try out a cheap Windows 10 laptop specifically to see how far the Linux Subsystem (WSL) has come.

WSL is linux running natively on Windows. 

I admit when I first heard about WSL I was really intrigued. Could this be that killer feature that will win over developers? WSL has the potential to fill in the main reason why I use a Mac. The Apple repair was really just the excuse for me to have some fun and try out WSL for myself.  

Huawei is really good at copying Apple products.

Huawei might not be very popular in American however that’s probably changing. The Verge did an article on how Huawei’s new MateBook X Pro is the best laptop right now. For this reason alone I decided to try out one of Huawei’s low end laptops. All of their products looks and feel just like a Mac. Their higher end model even has the fingerprint reader on the power button just like TouchID. They seem like the perfect choice for web developers considering the move back to Windows.

WSL allows for near MacOS local development.

With some trial and errors I was able to get all of my WordPress development tools working on Windows 10. In fact by day 3 into my week I actually forgot I wasn’t on MacOS. Here is what my setup looks like.

There were a few things which required windows alternatives. 

Some quirks running mixed Windows and Linux.

For web development this works by storing all coding files on Windows part via the typically C:\Users\<username>\. From Linux this path is accessible via /mnt/c/Users/<usersname>/. That means in Linux you can do things fancy things like git push and git pull with all coding done with an editor like Atom in windows. This can create some interesting issues like all files within a .git repo appearing changed due to file permission whereas on Linux they are fine. This can be resolved by telling git ignore file permissions with git config core.filemode false.

Another common issue is how Windows and Linux differ with line endings. This especially causes problems when writing a bash script. Luckily this is an easy configuration change with Atom as shown here.

WSL works fairly good however needs more polish.

It didn’t take long before I hit my first roadblock using WSL. Out of the box  file/folder permission commands like chmod or chown are not supported. In order to get them partially working you have to enable Windows’ Inside Program which puts Windows on a the newest evaluation build.

The native Windows 10 command prompt isn’t that great. While using something like Cmder significantly improved things, it still has some bugs and requires extra configuration in order to get mostly working. Towards the end of the week I was also playing around with Terminus as explained in this guide. I wasn’t able to get a basic thing like “pasting in multiple lines of code” into either Cmder or Terminus.

I suspect most of the bugs could be overcome with continued tweaking.

That said this isn’t ready for most people. I recommend waiting till everything just works on the stable release of Windows. It’s really great to see Windows starting to embrace Linux and I’m excited to see it continue. For now, I’m back to my Macbook Pro.