Install PowerShell Core (Linux)

PHOTO EMBED

Wed Feb 02 2022 22:15:45 GMT+0000 (Coordinated Universal Time)

Saved by @jimbrig #installation #linux #bash #wsl #powershell

#!/usr/bin/env bash

# Update the list of packages
sudo apt-get update

# Install pre-requisite packages.
sudo apt-get install -y wget apt-transport-https software-properties-common

# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb

# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb

# Update the list of packages after we added packages.microsoft.com
sudo apt-get update

# Install PowerShell
sudo apt-get install -y powershell

# Start PowerShell
pwsh
© 2022 GitHub, Inc.
content_copyCOPY

https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-pwsh.sh