Skip to content

Instantly share code, notes, and snippets.

@PSingletary
Last active February 18, 2020 04:10
Show Gist options
  • Select an option

  • Save PSingletary/68cecaf7b93378c78d9a980745d4dac1 to your computer and use it in GitHub Desktop.

Select an option

Save PSingletary/68cecaf7b93378c78d9a980745d4dac1 to your computer and use it in GitHub Desktop.
WSL + PWSH 7
#Source: https://www.saggiehaim.net/powershell/install-powershell-7-on-wsl-and-ubuntu/
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu -OutFile Ubuntu.appx -UseBasicParsing
Add-AppxPackage .\Ubuntu.appx
# Create Folder
sudo mkdir /usr/share/PowerShell
# Change Working Dir
cd /usr/share/PowerShell
sudo tar xzvf powershell-7.0.0-rc.2-linux-x64.tar.gz
sudo wget https://github.com/PowerShell/PowerShell/releases/download/v7.0.0-rc.2/powershell-7.0.0-rc.2-linux-x64.tar.gz
# Navigate to home directory
cd #HOME
# Edit the .profile file
nano .profile
PATH="$PATH:/usr/share/PowerShell"
sudo rm /usr/share/PowerShell/powershell-7.0.0-rc.2-linux-x64.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment