Installing PowerShell 7
Somewhat perversely, I find that installing PowerShell on Linux is probably easier than installing it on Windows, despite PowerShell being developed for Windows. Microsoft publishes good scripts that we can use for the supported versions of Linux; note, though, that there are very few supported flavors: RHEL, Ubuntu, Alpine, and Debian.
This doesn’t mean we can’t install PowerShell on other versions, only that Microsoft doesn’t provide any support for us. Microsoft only supports specific recent versions as well. Because of the rate at which both operating systems change, it’s worth making sure that our versions of PowerShell and Linux are on the supportability matrix; otherwise, we may get unexpected results, as we will see when we look at installing on CentOS.
Let’s start with Ubuntu, which I’ve got running in WSL on my Windows 10 client.
Installing PowerShell on Ubuntu 22.04
In this section, we are going...