How to Install PowerShell in Ubuntu 20.04 lts - BRS MEDIA TECHNOLOGIES
Microsoft PowerShell

How to Install PowerShell in Ubuntu 20.04 lts

All packages are available on our GitHub releases page. After the package is installed, run pwsh from a terminal. Run pwsh-preview if you installed a Preview release.

For Linux distributions that aren’t officially supported, you can try to install PowerShell using the PowerShell Snap Package. You can also try deploying PowerShell binaries directly using the Linux tar.gz archive, but you would need to set up the necessary dependencies based on the OS in separate steps.

Officially supported platform releases for PowerShell 7.1

  • Ubuntu 16.04/18.04/20.04 (including ARM64)
  • Ubuntu 19.10 (via Snap package)
  • Debian 9/10
  • CentOS and RHEL 7/8
  • Fedora 30
  • Alpine 3.11+ (including ARM64)

Officially supported platform releases for PowerShell 7.0

  • Ubuntu 16.04
  • Ubuntu 18.04 and 20.04
  • Debian 8
  • Debian 9
  • Debian 10
  • Alpine 3.9 and 3.10
  • CentOS 7
  • Red Hat Enterprise Linux (RHEL) 7
  • Fedora 28
  • Fedora 29
  • Fedora 30
  • openSUSE 42.3
  • openSUSE Leap 15

Community supported releases

  • Ubuntu 18.10
  • Ubuntu 19.10 and 20.10
  • Arch Linux
  • Kali
  • Raspbian (experimental)

Alternate install methods

  • Snap Package
  • Binary Archives
  • .NET Global tool

Installation via Package Repository – Ubuntu 20.04

PowerShell for Linux is published to package repositories for easy installation and updates.

The preferred method is as follows:

# 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

As superuser, register the Microsoft repository once. After registration, you can update PowerShell with sudo apt-get install powershell.

Installation via Direct Download – Ubuntu 20.04

Download the Debian package powershell_7.1.4-1.ubuntu.20.04_amd64.deb from the releases page onto the Ubuntu machine.

Then, in the terminal, execute the following commands:

sudo dpkg -i powershell_7.1.4-1.ubuntu.20.04_amd64.deb
sudo apt-get install -f

Uninstallation – Ubuntu 20.04

sudo apt-get remove powershell

Reference Link: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1

Other Angel Softwares

WinSCP

WinSCP utility to transfer files

Contents1 WinSCP utility to transfer files to Unix and Linux from Windows1.1 Security1.2 Built-in Text Editor1.3 Key Features:1.4 Summary1.5 Downloads1.6 […]

PuTTY

PuTTY utility to connect Unix and Linux

Contents1 PuTTY is a utility to connect Unix and Linux from Windows1.0.1 Downloads1.1 PuTTYgen1.1.1 How to use PuTTYgen?1.1.2 Types of […]

7zip

7zip Popular file compression utility

Contents1 7-Zip is a popular open-source file compression utility1.0.1 Key Features:1.0.2 Download1.0.3 Key Terms: 7-Zip is a popular open-source file […]

TrueNAS Scale Logo

Open Storage at Scale-TrueNAS Scale

TrueNAS SCALE is the latest member of the TrueNAS family and provides Open Source HyperConverged Infrastructure (HCI) including Linux containers and […]

Terraform Logo

HashiCorp Terraform-Automate Infrastructure on Any Cloud

Contents1 Build, change, and destroy infrastructure with Terraform.1.0.1 How does Terraform work?1.0.2 The core Terraform workflow consists of three stages:1.0.3 […]

Vagrant Logo

HashiCorp Vagrant – Development Environments Made Easy

Contents1 Introduction to Vagrant1.0.1 Why Vagrant?1.0.2 Powerful features1.0.3 Vagrant vs. Terraform1.0.4 Downloads1.0.5 Key Terms: Introduction to Vagrant Vagrant is a […]