Much of PowerShell is .NET, so it can run on any operating system that has the Common Language Runtime (CLR). On Windows, that's the .NET Framework. For other operating systems (including Linux!), you can use the CoreCLR, an open-source, cross-platform subset of the .NET Framework.
As you found in the PowerShell repository on GitHub, quite a few OSes and distributions are supported. For example, here are the instructions for Ubuntu. Demonstration (source page):
One could argue that not all of PowerShell is available in non-Windows environments. Some features depend on libraries only found on Windows. The
ParsedHtml property on the
HtmlWebResponseObject type returned by
Invoke-WebRequest, for example, is only useful on Windows because it holds a COM object that comes from an unmanaged library,
mshtml.dll to be specific. On other platforms, there's nothing there. And, of course, there are cmdlets to manage systems only found on Windows, like Modern apps (
Get-AppxPackage and friends).
Still, though, the PowerShell infrastructure works perfectly fine on other operating systems. Plenty of cmdlets are usable anywhere, and support is only getting better.