Windows Subsystem for Linux

Linux was my main operating system during my university days, but when I started working at ARCADIS, I was back in an all-Windows environment. I’ve learned to live with it, but there are still cases when having a Linux system around is useful or even necessary, especially for development work. I’ve got dual-boot set up on my desktop PC, but having to reboot is pretty annoying. That’s why I have started using WSL, Microsoft’s Windows Subsystem for Linux. This is a lightweight virtual machine that runs on Windows.

Install WSL on Windows 10 is extremely simple. All you need to do is open a Power Shell with administrator rights and run the command wsl — install, which will install Ubuntu. Installation on my laptop failed initially as virtualisation was turned off in the BIOS. Installation can be restarted by installing Ubuntu from the Microsoft Store. During a successful installation, you are prompted for the username and password of the initial user – note that the username has to be all lowercase.

After installation, you get a bash shell. As recommended by the messages in the shell and Microsoft’s article, you should first install updates by doing sudo apt update and sudo apt upgrade. New packages can be installed in the usual Ubuntu/Debian way with sudo apt install.

Your Windows drives are available under /mnt, i.e. /mnt/c for the C drive.Your Linux home directory is available as network drive in the Windows Explorer, e.g. \\wsl$\Ubuntu\home\toby in my case. More info about setting up Visual Studio and how to proceed can be found in the article mentioned above. It is also possible to run Linux GUI programs, but this requires Windows 11.

 

 

Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “Windows Subsystem for Linux”