For years people have been saying that this year, or next, will be "Linux on the desktop year", sometimes somewhat sarcastically. Well, in a way, I would like to repeat that and name 2020 as that year. The surprise factor is that it could be thanks to Microsoft.
How do people run Linux on the desktop (or laptop) currently?
There are three main approaches:
- Overwrite Windows with a Linux distribution. i.e. your machine only runs Linux – you make use of no Microsoft systems or applications. Any peripheral – such as a printer – must have a Linux driver; and many do.
- Dual boot your machine. That is, you can switch at power-on between running Windows and Linux. This is good as long as most of the time you are on one side of the fence or the other, to avoid the tedium of switching back and forth.
- Run Linux in a Virtual Machine (VM) under Windows. (Equally, you could run Windows in a VM under Linux.) Also fine, but you don't get access to 100% of the underlying machine's resources.
What are some of the issues?
Many people do one of the above. Any solution is going to be a compromise of convenience (e.g. being able to access and run Windows and Linux apps at the same time) and efficiency (e.g. running in a VM will always be a little slower than native on the raw hardware). Microsoft's WSL2 (Windows Subsystem Linux 2) is yet another compromise, but in my view an excellent one. It is like a VM but much more lightweight than traditional VMs, and it lets you mix Linux and Windows programs together.
Once you have chosen a Linux distribution to install alongside Windows, you don't really notice or see the virtualisation that is going on. You can have Windows terminals running CMD and/or Powershell alongside ones running Linux's Bash shell. You can get a GUI view of your files, under Bash, by running "exployer.exe ." – i.e. the everyday Windows file explorer can be used to browse the Linux side of your file store.
What has Microsoft done?
Or nearly done, as WSL2 is only currently available for people who don't mind the risk of running "preview" releases of Windows 10 (64-bit only). I don't altogether recommend running preview releases, but I'm taking the risk, on a spare machine, to be ready to help people when WSL2 arrives in a regular update, sometime in 2020.
Microsoft have learnt – from systems like Docker and their own Azure cloud-based version of Linux – how to use low level virtualisation technology to make everything as smooth as possible and almost transparent.
(Microsoft's first go at this (WSL or WSL1) was an attempt to translate Linux calls to Windows ones. It worked to some extent but it is almost impossible to do such a level of emulation completely and efficiently, and so some things did not work or were very slow. Now, with WSL2, there is a real and full Linux kernel so, by definition, all the system calls are supported. WSL1 remains available and under support by Microsoft.)
One example of why I like the WSL2 approach is the use of Dropbox. This popular application runs on both Linux and Windows (and Macs of course). Linux is a slightly poor relative in that it does not have all the Windows/Mac features and you need a specific supported file system. Recently, Dropbox also stopped support for sharing a dropbox between two operating systems – either virtualised or dual boot ones with a shared partition. Some people actually run a dropbox on both sides of the fence on a single machine, duplicating all their files. With WSL2 all options are possible. The one that seems best to me is to have a supported, full-featured dropbox under Windows and access it when needed from the Linux side. The Dropbox application 'thinks' it is just a Windows based one, so the above mentioned restriction does not apply.
Why has Microsoft done this?
There are all sorts of conspiracy theories out there, but the real reason is that Microsoft has "bet the company" on its Azure Cloud services. Recently, the number of Linux machines that Azure users spin-up has overtaken the number of Windows instances. Microsoft want to make it as easy as possible for you to access and update your cloud services from your Windows desktop/laptop, hence Windows Subsystem Linux.
Because there is little difference between using cloud computing resources and on-site ones (for us, examples are CSF3 and Condor to name two) – or national resources (such as ARCHER) – researchers can reap the benefit of having convenient Linux compatibility on their personal Windows machines even if they never consider accessing cloud services.
Finally, as a long time Apple Mac user, my next laptop purchase may well be a Windows 10 one! We will see. But, as my colleague Ian Hinder pointed out, what will I do with my bag of dongles?
For those who want to wait for the production release, it is expected that this Linux kernel integration will be available later this year, with a Windows 10 update that’s code-named 19H2. IT Services will assess adopting that release once it is stable.
This is an opinion piece, by Research Software Engineer (RSE) Ian Cottam, and does not reflect the views of Research IT or IT Services in general. Further, please note that the work reported on here is being done on a personal laptop (i.e. a Bring-Your-Own-Device to work, aka BYOD).