This guide will walk you through installing PowerShell on Ubuntu 20.04. I’m doing this on Windows Subsystem for Linux (WSL), and have not encountered any compatibility issues with the PowerShell & Ubuntu combo.
For the latest updates on PowerShell installation, version compatibility, and support dates, refer to MS Docs for Installing PowerShell on Linux (Ubuntu).
Installing PowerShell on Ubuntu
Follow the steps below to install PowerShell on Ubuntu 20.04 using the official Microsoft package repository.
Step 1: Update System Packages
Run the following command to update the list of available packages:
# Update the list of packages sudo apt-get update
Step 2: Install Required Dependencies
Install the necessary packages to add the Microsoft repository:
# Install pre-requisite packages. sudo apt-get install -y wget apt-transport-https software-properties-common
Step 3: Download and Register the Microsoft Repository GPG Keys
# Register the Microsoft repository GPG keys sudo dpkg -i packages-microsoft-prod.deb
Step 4: Update Package List Again
After adding the Microsoft repository, refresh the package list:
# Update the list of packages after we added packages.microsoft.com sudo apt-get update
Step 5: Install PowerShell
# Install PowerShell on Ubuntu sudo apt-get install -y powershell

The installation process should only take a minute, including the updates via the Advanced Package Tool (APT).
The above PowerShell installation should only take a minute or so to complete, including the Advanced Package Tool (apt) updates.
Running PowerShell on Ubuntu
After installation, you can start PowerShell on Ubuntu and check the installed version.
Step 1: Verify PowerShell Installation
To check the installed PowerShell version, run:
# Check PowerShell Version on Ubuntu pwsh -v
Step 2: Launch PowerShell
To start PowerShell, use the following command:
# Start PowerShell on Ubuntu pwsh

Once inside PowerShell, you can check more details about the installation and OS info by running the following:
# Check PowerShell Version $PSVersionTable

I have a short post for how to check running PowerShell version if you’d like to check that out too.
Conclusion
You have successfully installed PowerShell on Ubuntu 20.04, and maybe you also did this on WSL Ubuntu like me!
The default Alias for PowerShell is pwsh
. You can find information about pwsh and pwsh parameters in the Microsoft Docs page, About Pwsh: Parameters
Hope all this was useful, cheers!