How to Install PowerShell on Linux

Using apt

sudo apt -y update
sudo apt install -y wget apt-transport-https software-properties-common
wget -q https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt -y update
sudo apt install -y powershell

Manual Installation

PowerShell on Github