11---
22description : Information about installing PowerShell on various Linux distributions
3- ms.date : 01/12 /2024
3+ ms.date : 05/07 /2024
44title : Alternate ways to install PowerShell on Linux
55---
66# Alternate ways to install PowerShell on Linux
@@ -32,9 +32,10 @@ installed.
3232
3333### Installation via Snap
3434
35- PowerShell for Linux is published to the [ Snap store] [ 17 ] for easy installation and updates.
35+ There are two PowerShell for Linux is published to the [ Snap store] [ 17 ] : ` powershell ` and
36+ ` powershell-preview ` .
3637
37- The preferred method is as follows :
38+ Use the following command to install the latest stable version of PowerShell :
3839
3940``` sh
4041# Install PowerShell
@@ -44,7 +45,8 @@ sudo snap install powershell --classic
4445pwsh
4546```
4647
47- To install the latest LTS version, use the following method:
48+ If you don't specify the ` --channel ` parameter, Snap installs the latest stable version. To install
49+ the latest LTS version, use the following method:
4850
4951``` sh
5052# Install PowerShell
@@ -54,6 +56,10 @@ sudo snap install powershell --channel=lts/stable --classic
5456pwsh
5557```
5658
59+ > [ !NOTE]
60+ > Microsoft only supports the ` latest/stable ` and ` lts/stable ` channels for the ` powershell `
61+ > package. Do not install packages from the other channels.
62+
5763To install a preview version, use the following method:
5864
5965``` sh
@@ -64,6 +70,10 @@ sudo snap install powershell-preview --classic
6470pwsh-preview
6571```
6672
73+ > [ !NOTE]
74+ > Microsoft only supports the ` latest/stable ` channel for the ` powershell-preview ` package. Do not
75+ > install packages from the other channels.
76+
6777After installation, Snap will automatically upgrade. You can trigger an upgrade using
6878` sudo snap refresh powershell ` or ` sudo snap refresh powershell-preview ` .
6979
0 commit comments