This is the snap for PowerShell, "PowerShell for every system". It works on Ubuntu, Fedora, Debian, and other major Linux distributions.
sudo snap install powershell --classic
sudo snap install powershell-preview --classic
- Some people have reported that the auto-alias of
powershell-preview
topwsh-preview
is not working. I have reported this to Canonical.
- Run
whereis pwsh-preview
if,/snap/bin/pwsh-preview
is not returned, Snap has not created the alias. - If Snap has created the alias, and it is not working, you may need to reboot (or logout and back in) before it will work.
- If Snap has not created the alias, you can create the alias with
sudo snap alias <packagename> <aliasname>