I recently bought a new laptop. And I realized it’s a game changing purchase for me, I changed a lot my target and preferences. But one thing triggered in me the memories of how – in many years of my career – the approach to run a *nix environment in a Windows machine changed: I’m not setting for this laptop a dual boot; first time after many years. I’m giving a try to Windows Subsystem for Linux.

Let me write again *nix. Because I started before Linux, I worked on Solaris (when it was Sun), on the original IBM Unix, before joining Linux.

At the beginning of my career I worked “remotely” on Unix and Solaris systems, I developed entire projects using emacs on telnet, and yes, it’s doable. Nowadays we wouldn’t think of developing code without the heavy assistance that our IDEs may offer, but… in the late 90s I did.

The advantages of developing on *nix environment, for a Java developer are unquestionable (and that’s why I would not elaborate on it). It’s enough to remind that earlier versions of Windows were used to “lock” the jar files, preventing them to be updated, but silently.

A company “natively” offering to developers Linux?

The point is, if we use our machines we can do what we want, but if we are in a company there’s an high probability they hava as corporate standard the Microsoft environments.

Many times in my career I get the question “which operating system do you want on your [company] machine?”. My answer has always been “Ubuntu, thank you”. And only 2 times I didn’t heard a fast and loud “No, this is not an option”. To tell the truth, one of this 2 times I get a reply 3 days later saying something like “We checked, we don’t have that version of Windows”.

To make it short, in many corporate laptops I had, only one time I get a native, working, Linux environment.

Of course we’re cutting from this list the few companies I met that – by design – offer to their people a Mac. Nowadays is more frequent, as far as I see here in Poland. A new trend is to leave Microsoft, working on fully cloud solutions offered by Google.

Working with your non-Windows machine in a company?

Over the years, sometimes I get asked to work with my own laptop in the Company. Being a freelance this is common. Nevertheless, it may be complicated when “they” then discover that in your machine you don’t have Windows, while the company is Windows-based.

In that scenario remains on your side the effort of integrating your machine in all the company’s system, dealing with authentication – mainly – mail exchange and so on.

The rise of the local unix for Windows: CygWin shell

My first approach to have a *nix environment comes in 2002, when I decide to “try” to install in my Windows NT workstation the “cygwin” shell. It’s “…a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows”. So it’s a way to translate unix commands into Windows, but not yet a complete way of running in your local windows machine a *nix application. It’s just a way to find, grep, other *nix commands in a Windows machine.

The Cygwin project is still alive, even if… well, I will get to this point in a while. Worth to mention the name “Cygwin” comes from the name of the company that developed it, “Cygnus Solutions”. Never heard of them? It’s now called “Red Hat”. And that says all, for who already knows what will be the next steps.

By the way, I remember that at that time, as my *nix proficiency was limited, I installed that tool to give a try with the awareness that… “If I don’t know how to use it, I may use my Windows”. I smile to this thinking now.

The era of the dual boots

Another diffused option to stay in peace with both the 2 worlds is, of course, having both. So to configure your machine in order to choose at startup which operationg system you would like to use.

I installed in my laptop my first version of Ubuntu in 2006. At that time I was in a company, Nexse, in which research and innovation was coming always in a good position. So we were left free to experiment with Linux, that was always more taking over on other Unix systems. So I decide for Ubuntu, a choice that I still have with me, and for the “dual boot” approach. My machine has a Windows partition and a Linux one.

In a while you become familiar with this screen, GRUB, allowing you to “choose” your boot system.

Is it comfortable? Well, in time, it may work. When you’re a Project Manager or a Trainer, you need Windows, you need Office, you use the Windows side of your system. When you’re a developer, you run Linux. When I was a child, at school, we were used to recycle notebooks (I mean the paper ones 🙂 ). If there were 2 courses for which both there was not to much to write, we were using the notes from both ends.

Working with dual boot is something like this. You have one piece of hardware, but according the side you open it, you will have 2 contents.

At a point in time, Microsoft decide to make harder for us the dual boots. With the introduction of Secure Boot, for a while the market put a serious brake on the dual boot approach. Some computer manifacturer introduced models that were not booting with a “non welcome” operating system. For some time we had on the market computers bound to Windows and without any other option.

Slowly, also this has been workarounded. Also the Linux versions started to be “signed” and now the issues are mainly workarounded. But, meanwhile, a new option was popping out.

But the dual boot is an option on your personal laptop, in a wide thinking company, and what if you are in a multinational company that fully relies on Windows? You’ll never have such an option… you’ll develop on Windows.

Using a Virtual Machine

The virtualization open a new option. With time our machines became powerful, and the software and hardware are allowing to create virtual computers. We wouldn’t live, nowadays, without the idea of virtualization, that is like… creating a program that believes to be a computer. So I get my Windows Laptop in the morning and – you may be sure – by end of the day I will have installed VirtualBox or something similar (the earlier option was VMWare) to run an Ubuntu VM into my laptop. I maximize the VM window to full screen, and… got it! I am working and programming in Linux.

Is it perfect? Of course no, there’s a lot of issues, sharing files it’s complicated, sharing the screen, and… you have to deal with the network. In some cases the company security policies would prevent you to put your VM into the company network.

WSL, the Windows Subsystem for Linux

Folks, I’m part of the generation that is grown up in the IT with the assumption that Microsoft is the evil, that any Microsoft product is bad because “it’s microsoft, what do you expect?”. But scenario is changing. Newer versions of Windows are becoming more stable, the “Blue Screen of death” is always more a memory, while the Linux distributions, also my beloved Ubuntu, sometimes in the aim of catching more people offering a more user friendly experience, collect complexity and sometimes malfunctions. And for some applications, like the “Office” applications, Microsoft is still ahead.

I’m writing you now with my new Windows 11 Pro, and I will give a try to WSL. What is WSL? “The Windows Subsystem for Linux lets developers run a GNU/Linux environment — including most command-line tools, utilities, and applications — directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.” Read like “We know that you, developer, use Linux, so we wil provide you”. The definition above (sourced from Microsoft page) it’s a death sentence for the efforts that developers like me did in the past. In the form we know it, WSL exists from the latest updates of Windows 10.

I can now have my Ubuntu machine, my terminal commands, my Linuix application, my Linux filesystem, that exists in the same space-time with Windows. I can even read in Windows Explorer the files of my Linux “partition” (that is no longer a partition) and send them by email with Outook.

No more burden of “restarting the machine”, or dealing with networking with a VM.

And… I may have many Linux distributions, simultaneously. It sounds fantastic!

Source: Microsoft

The CygWin is so far away in time.

Is it welcoming the opponent that is winning over you a way to capsize the battle? I remember when I started seeing IBM “selling” Linux solutions instead of their own Unix. But Linux has been created as an alternative to Unix, and the reaction of the Unix creator’s has been…. accepting they’ve lost. Sounds like microsoft is doing the same, and… it may be a key to success.

Is WSL killing the need of a dual boot? Is WSL well structured to allow me to work my Linux based contents while running Windows? We’ll see, but so far… I’m giving it a chance.

A *nix developer in a Windows world
Tag: