Windows 10 comes with Windows Subsystem for Linux (WSL) feature that you can use to run various Linux distributions. Launch a PowerShell with elevated privileges to enable the WSL:
Enable-WindowsOptionalFeature -FeatureName Microsoft-Windows-Subsystem-Linux -Online
Next, open the Microsoft Store on Windows 10, and search for “Linux”. Install one of the supported Linux distros (for example, Debian)!
That is all that is required. You can now open Debian from within PowerShell or via the start menu. Simply run the “Debian” command. When you do this for the first time, you’ll have to define a root account and password.
As you probably know, PowerShell 6 is platform independent and runs on Linux too. If you wanted to use your new Debian environment to also test-drive PowerShell 6 on Linux, run the following commands from within your Debian console:
sudo apt-get update
sudo apt-get install curl apt-transport-https
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo sh -c 'echo "deb https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/microsoft.list'
sudo apt-get update
sudo apt-get install -y powershell
Next, from within Debian, run the “pwsh” command to switch to PowerShell 6.
psconf.eu – PowerShell Conference EU 2019 – June 4-7, Hannover Germany – visit www.psconf.eu There aren’t too many trainings around for experienced PowerShell scripters where you really still learn something new. But there’s one place you don’t want to miss: PowerShell Conference EU - with 40 renown international speakers including PowerShell team members and MVPs, plus 350 professional and creative PowerShell scripters. Registration is open at www.psconf.eu, and the full 3-track 4-days agenda becomes available soon. Once a year it’s just a smart move to come together, update know-how, learn about security and mitigations, and bring home fresh ideas and authoritative guidance. We’d sure love to see and hear from you!
ReTweet this Tip!
And of course install VSCode as part of this process