Install PowerShell on Linux

PowerShell can be installed on several different Linux distributions. Most Linux platforms and distributions have a major release each year, and provide a package manager that's used to install PowerShell. PowerShell can be installed on some distributions of Linux that aren't supported by Microsoft. In those cases, you may find support from the community for PowerShell on those platforms.

For more information, see the PowerShell Support Lifecycle documentation.

This article lists the supported Linux distributions and package managers. All PowerShell releases remain supported until either the version of PowerShell or the version of the Linux distribution reaches end-of-support.

For the best compatibility, choose a long-term release (LTS) version.

Alpine

Microsoft supports PowerShell until PowerShell reaches end-of-support or the version of Alpine reaches end-of-life.

Alpine 3.16 - OS support ends on 2024-05-23

  • Docker images containing PowerShell 7.2, PowerShell 7.4, and PowerShell 7.5-preview for x64 are available from the Microsoft Artifact Registry

Alpine 3.17 - OS support ends on 2024-11-22

  • Docker images containing PowerShell 7.2, PowerShell 7.4, and PowerShell 7.5-preview for x64 are available from the Microsoft Artifact Registry

Docker images of PowerShell are not available for Alpine 3.18 and 3.19 at this time.

Preview versions of PowerShell are provided for testing and feedback only.

For more information, see Install PowerShell on Alpine.

Debian

Debian uses APT (Advanced Package Tool) as a package manager.

Microsoft supports PowerShell until PowerShell reaches end-of-support or the version of Debian reaches end-of-life.

Debian 11 (Bullseye) - OS support ends on 2024-07-31

  • Docker images containing PowerShell 7.2, PowerShell 7.4, and PowerShell 7.5-preview for x64 are available from the Microsoft Artifact Registry

Debian 12 (Bookworm) - OS support ends on 2026-06-10

  • Docker images containing PowerShell 7.2, PowerShell 7.4, and PowerShell 7.5-preview for x64 are available from the Microsoft Artifact Registry

Preview versions of PowerShell are provided for testing and feedback only.

For more information, see Install PowerShell on Debian.

Red Hat Enterprise Linux (RHEL)

RHEL 7 uses yum and RHEL 8 uses the dnf package manager.

Microsoft supports PowerShell until PowerShell reaches end-of-support or the version of RHEL reaches end-of-support.

RHEL 8 - OS support ends on 2029-05-31

  • Docker images containing PowerShell 7.2, PowerShell 7.4, and PowerShell 7.5-preview for x64 are available from the Microsoft Artifact Registry

RHEL 9 - OS support ends on 2032-05-31

  • Docker images containing PowerShell 7.2, PowerShell 7.4, and PowerShell 7.5-preview for x64 are available from the Microsoft Artifact Registry

PowerShell is tested on Red Hat Universal Base Images (UBI). For more information, see the UBI information page.

For more information, see Install PowerShell on RHEL.

Ubuntu

Ubuntu uses APT (Advanced Package Tool) as a package manager.

Microsoft supports PowerShell until PowerShell reaches end-of-support or the version of Ubuntu reaches end-of-support.

Ubuntu 20.04 (Focal Fossa) - OS support ends on 2025-04-02

  • Docker images containing PowerShell 7.2, PowerShell 7.4, and PowerShell 7.5-preview for x64 and Arm32 are available from the Microsoft Artifact Registry

Ubuntu 22.04 (Jammy Jellyfish) - OS support ends on 2027-04-01

  • Docker images containing PowerShell 7.2, PowerShell 7.4, and PowerShell 7.5-preview for x64 and Arm32 are available from the Microsoft Artifact Registry

Ubuntu 24.04 (Noble Numbat) - OS support ends on 2029-04-25

  • Docker images containing PowerShell 7.2, PowerShell 7.4, and PowerShell 7.5-preview for x64 and Arm32 are available from the Microsoft Artifact Registry

Microsoft doesn't support interim releases of Ubuntu. For more information, see Community supported distributions.

For more information, see Install PowerShell on Ubuntu.

Community supported distributions

PowerShell can be installed on many distributions of Linux that aren't supported by Microsoft. In those cases, you may find support from the community for PowerShell on those platforms

To be supported by Microsoft, the Linux distribution must meet the following criteria:

  • The version and architecture of the distribution is supported by .NET Core.
  • The version of the distribution is supported for at least one year.
  • The version of the distribution isn't an interim release or equivalent.
  • The PowerShell team has tested the version of the distribution.

For more information, see Community support for PowerShell on Linux.

Alternate installation methods

There are three other ways to install PowerShell on Linux, including Linux distributions that aren't officially supported. You can try to install PowerShell using the PowerShell Snap Package. You can also try deploying PowerShell binaries directly using the Linux tar.gz package. For more information, see Alternate ways to install PowerShell on Linux.