Skip to content

Instantly share code, notes, and snippets.

@atulkamble
Last active August 11, 2021 06:03
Show Gist options
  • Save atulkamble/c76063995e5e59bfebb782d949dce296 to your computer and use it in GitHub Desktop.
Save atulkamble/c76063995e5e59bfebb782d949dce296 to your computer and use it in GitHub Desktop.
Installing PowerShell on Linux | Ubuntu 20.04
# 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 products
sudo apt-get update
# Enable the "universe" repositories
sudo add-apt-repository universe
# Install PowerShell
sudo apt-get install -y powershell
# Start PowerShell
pwsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment