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
pwsh-previewis not working. I have reported this to Canonical.
/snap/bin/pwsh-previewis 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>