The [docs at microsoft.com](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.3) and [installing on Ubuntu](https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu?view=powershell-7.3) For Ubuntu (which I use): ```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/$(lsb_release -rs)/packages-microsoft-prod.deb" # Register the Microsoft repository GPG keys sudo dpkg -i packages-microsoft-prod.deb # Delete the the Microsoft repository GPG keys file rm 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 ```