Does PowerShell run on Linux?

Verdict: Yes

Yes. Microsoft build and support PowerShell on Linux, with packages for Ubuntu, Debian, Red Hat Enterprise Linux and Alpine from Microsoft's own package site.

PowerShell by Microsoft · Coding · Has a Linux version

Microsoft publish PowerShell for Linux and support it for as long as both PowerShell and your version of Linux are supported. Ubuntu, Debian, Red Hat Enterprise Linux and Alpine are the ones Microsoft test and support. Packages come from Microsoft's own package site in the standard installer formats, and there is a Snap package and a plain archive for other systems.

It is the cross-platform version, not the one built into Windows. Everyday commands, the pipeline, modules and your own scripts work. Anything that reaches into the Windows registry, COM objects or Windows-only modules will not, because those parts of Windows do not exist here.

PowerShell can also be installed on distributions Microsoft do not test, where you rely on the community rather than Microsoft if something breaks.

Your scripts move as ordinary text files. Expect to rewrite the parts that talk to Windows itself, and to adjust file paths, since Linux uses forward slashes and cares about capital letters in file names.

Check the next one

Last checked . Sources: