

Next, I use Invoke-WebRequest to download the Ubuntu distribution: PS C:\Windows\system32> Invoke-WebRequest -Uri -OutFile ~/Ubuntu.zip –UseBasicParsing First, we enable the WSL feature which will require a reboot: PS C:\Windows\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux Install Ubuntu on Windows 10 To install Ubuntu on my Windows 10 machine, I will take a page from Microsoft’s documentation and install a Linux distribution (Ubuntu) on a Windows 10 computer all from PowerShell.

Notice the Windows file system is mounted on my Linux distribution under /mnt/c: Here, I perform the same command from my Bash shell in my Linux WSL instance on the same Windows directory. In addition, you can interact with your Windows host from your Bash prompt, and also run Linux commands from cmd and PowerShell.įor instance, from PowerShell I can now do run ls –la on my Windows directory by using the wsl.exe executable: The difference with WSL, is that you don’t have the same overhead in terms of resources as a virtual machine. When I heard of WSL, one of the first thoughts I had was the question, “Why not just use a VM instead like we have been doing for years?” First, this is certainly still something IT professionals or developers can do. Now, you can even install a Linux distribution directory on Windows 10 natively (without using a VM) with the Windows Subsystem for Linux (WSL). PowerShell is now cross-platform and runs on Linux. Since the hiring of Satya Nadella as Microsoft’s CEO, we have seen countless acts of goodwill as Microsoft has embraced Linux into its ecosystem. That war may still be happening, but at least from the perspective of Microsoft, an olive branch has been extended to the Linux community. Each faction trying to destroy the other and win the war of the operating systems. There once was a time where the worlds of Microsoft and Linux were greatly at odds.
