Skip to content

Commit 92131d9

Browse files
sdwheelerCopilot
andauthored
Fixes #12841 - Update macOS install docs and move Brew to alternate doc (#12842)
* Update macOS install docs and move Brew to alternate doc * Fix links and add source build notes * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f901675 commit 92131d9

File tree

5 files changed

+142
-155
lines changed

5 files changed

+142
-155
lines changed

redir/.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"redirections": [
3+
{
4+
"redirect_document_id": false,
5+
"redirect_url": "/powershell/scripting/install/alternate-install-methods",
6+
"source_path": "../reference/docs-conceptual/install/install-other-linux.md"
7+
},
38
{
49
"redirect_document_id": false,
510
"redirect_url": "/powershell/scripting/security/app-control/how-to-use-app-control",

reference/docs-conceptual/install/install-other-linux.md renamed to reference/docs-conceptual/install/alternate-install-methods.md

Lines changed: 83 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,79 @@
11
---
2-
description: Information about installing PowerShell on various Linux distributions
3-
ms.date: 02/17/2026
4-
title: Alternate ways to install PowerShell on Linux
2+
description: Alternate ways to install PowerShell on non-Windows platforms.
3+
ms.date: 03/11/2026
4+
title: Alternate ways to install PowerShell
55
---
6-
# Alternate ways to install PowerShell on Linux
6+
# Alternate ways to install PowerShell
77

8-
All packages are available on our GitHub [releases][14] page. After the package is installed, run
9-
`pwsh` from a terminal. Run `pwsh-preview` if you installed a preview release.
8+
There are other ways to install PowerShell on non-Windows platforms.
109

11-
There are three other ways to install PowerShell on a Linux distribution:
10+
These methods may work but aren't officially supported by Microsoft. You may be able to get support
11+
from the PowerShell Community or the operating system vendor. For support options, see
12+
[Community Support][08].
1213

13-
- Install using a [Snap Package][11]
14-
- Install using the [binary archives][09]
15-
- Install as a [.NET Global tool][10]
14+
## Install on macOS using Homebrew
1615

17-
## Snap Package
16+
Homebrew is the preferred package manager for macOS. If the `brew` command isn't found, you need to
17+
install Homebrew following [their instructions][12].
1818

19-
Snaps are application packages that are easy to install, secure, cross‐platform and dependency‐free.
20-
Snaps are discoverable and installable from the Snap Store. Snap packages are supported the same as
21-
the distribution you're running the package on.
19+
```bash
20+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
21+
```
22+
23+
Once `brew` is installed, install PowerShell using the following command:
24+
25+
```sh
26+
brew install powershell
27+
```
28+
29+
> [!NOTE]
30+
> The brew formula builds PowerShell from source code rather than installing a package built by
31+
> Microsoft.
32+
33+
### Update PowerShell 7
34+
35+
Run the following commands to update the installed version of PowerShell to the latest release.
36+
37+
```sh
38+
brew update
39+
brew upgrade powershell
40+
```
41+
42+
### Uninstall PowerShell 7
43+
44+
If you installed PowerShell with Homebrew, use the following command to uninstall:
45+
46+
```sh
47+
brew uninstall powershell
48+
```
49+
50+
If you manually installed PowerShell 7, you must manually remove it. The following command removes
51+
the symbolic link and PowerShell files.
52+
53+
```sh
54+
sudo rm -rf /usr/local/bin/pwsh /usr/local/microsoft/powershell
55+
```
56+
57+
Use `sudo rm` to remove any other remaining PowerShell files and folders.
58+
59+
## Install on Linux using a Snap package
60+
61+
Snaps are application packages that are easy to install if your platform supports Snap. You can find
62+
and install Snap packages from the Snap Store.
2263

2364
> [!IMPORTANT]
24-
> The Snap Store contains PowerShell snap packages for many Linux distributions that are not
25-
> officially supported by Microsoft. For support, see the list of available [Community Support][08]
26-
> options.
65+
> The Snap Store contains PowerShell snap packages for many Linux distributions that aren't
66+
> officially supported by Microsoft.
2767
2868
### Getting snapd
2969

3070
The snap daemon, known as `snapd`, is the background service that manages and maintains your snaps.
3171
It needs to be running before a snap can be installed. For instructions on how to install `snapd`,
32-
see the [Snapcraft documentation][16].
72+
see the [Snapcraft documentation][14].
3373

3474
### Installation via Snap
3575

36-
There are two PowerShell for Linux is published to the [Snap store][17]: `powershell` and
76+
There are two PowerShell for Linux is published to the [Snap store][15]: `powershell` and
3777
`powershell-preview`.
3878

3979
Use the following command to install the latest stable version of PowerShell:
@@ -78,7 +118,11 @@ pwsh-preview
78118
After installation, Snap will automatically upgrade. You can trigger an upgrade using
79119
`sudo snap refresh powershell` or `sudo snap refresh powershell-preview`.
80120

81-
### Uninstallation
121+
> [!NOTE]
122+
> Snap packages build PowerShell from source code rather than installing a package built by
123+
> Microsoft.
124+
125+
### Uninstall using Snap
82126

83127
```sh
84128
sudo snap remove powershell
@@ -90,27 +134,27 @@ or
90134
sudo snap remove powershell-preview
91135
```
92136

93-
## Binary Archives
137+
## Install from binary archives
94138

95139
PowerShell binary `tar.gz` archives are provided for Linux platforms to enable advanced deployment
96140
scenarios.
97141

98142
> [!NOTE]
99143
> You can use this method to install any version of PowerShell including the latest:
100144
>
101-
> - Stable release: [https://aka.ms/powershell-release?tag=stable][14]
102-
> - LTS release: [https://aka.ms/powershell-release?tag=lts][12]
103-
> - Preview release: [https://aka.ms/powershell-release?tag=preview][13]
145+
> - Stable release: [https://aka.ms/powershell-release?tag=stable][11]
146+
> - LTS release: [https://aka.ms/powershell-release?tag=lts][09]
147+
> - Preview release: [https://aka.ms/powershell-release?tag=preview][10]
104148
105149
### Dependencies
106150

107-
PowerShell builds portable binaries for all Linux distributions. But, .NET Core runtime requires
108-
different dependencies on different distributions, and PowerShell does too.
151+
PowerShell builds portable binaries for all supported Linux distributions. But, PowerShell and the
152+
.NET runtime require different dependencies on different distributions.
109153

110154
It's possible that when you install PowerShell, specific dependencies may not be installed, such as
111155
when manually installing from the binary archives. The following list details Linux distributions
112156
that are supported by Microsoft and have dependencies you may need to install. Check the
113-
distribution page for more information:
157+
Linux distribution page for more information:
114158

115159
- [Alpine][01]
116160
- [Debian][02]
@@ -119,11 +163,7 @@ distribution page for more information:
119163
- [Ubuntu][05]
120164

121165
To deploy PowerShell binaries on Linux distributions that aren't officially supported, you need to
122-
install the necessary dependencies for the target OS in separate steps. For example, our
123-
[Amazon Linux dockerfile][15] installs dependencies first, and then extracts the Linux `tar.gz`
124-
archive.
125-
126-
### Installation using a binary archive file
166+
install the necessary dependencies for the target OS in separate steps.
127167

128168
> [!IMPORTANT]
129169
> This method can be used to install PowerShell on any version of Linux, including distributions
@@ -173,9 +213,12 @@ dotnet tool install --global PowerShell
173213
```
174214

175215
The dotnet tool installer adds `~/.dotnet/tools` to your `PATH` environment variable. However, the
176-
currently running shell does not have the updated `PATH`. You should be able to start PowerShell
216+
currently running shell doesn't have the updated `PATH`. You should be able to start PowerShell
177217
from a new shell by typing `pwsh`.
178218

219+
The .NET team publishes Docker images containing the .NET SDK with PowerShell already installed. You
220+
can find those images on the [Microsoft Container Registry][13].
221+
179222
<!-- link references -->
180223
[01]: /dotnet/core/install/linux-alpine#dependencies
181224
[02]: /dotnet/core/install/linux-debian#dependencies
@@ -185,12 +228,10 @@ from a new shell by typing `pwsh`.
185228
[06]: /dotnet/core/sdk
186229
[07]: /dotnet/core/tools/global-tools
187230
[08]: /powershell/scripting/community/community-support
188-
[09]: #binary-archives
189-
[10]: #install-as-a-net-global-tool
190-
[11]: #snap-package
191-
[12]: https://aka.ms/powershell-release?tag=lts
192-
[13]: https://aka.ms/powershell-release?tag=preview
193-
[14]: https://aka.ms/PowerShell-Release?tag=stable
194-
[15]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/unstable/amazonlinux/docker/Dockerfile
195-
[16]: https://snapcraft.io/docs/tutorials/install-the-daemon/
196-
[17]: https://snapcraft.io/store
231+
[09]: https://aka.ms/powershell-release?tag=lts
232+
[10]: https://aka.ms/powershell-release?tag=preview
233+
[11]: https://aka.ms/PowerShell-Release?tag=stable
234+
[12]: https://brew.sh/
235+
[13]: https://mcr.microsoft.com/en-us/artifact/mar/dotnet/sdk/
236+
[14]: https://snapcraft.io/docs/tutorials/install-the-daemon/
237+
[15]: https://snapcraft.io/store

reference/docs-conceptual/install/install-powershell-on-linux.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ PowerShell. PowerShell can be installed on some distributions of Linux that aren
1111
Microsoft. In those cases, you may find support from the community for PowerShell on those
1212
platforms.
1313

14-
For more information, see the [PowerShell Support Lifecycle][05] documentation.
14+
For more information, see the [PowerShell Support Lifecycle][01] documentation.
1515

1616
This article lists the supported Linux distributions and package managers. All PowerShell releases
1717
remain supported until either the version of PowerShell or the version of the Linux distribution
@@ -23,31 +23,31 @@ For the best compatibility, choose a long-term release (LTS) version.
2323

2424
[!INCLUDE [Alpine support](../../includes/alpine-support.md)]
2525

26-
For more information, see [Install PowerShell on Alpine][13].
26+
For more information, see [Install PowerShell on Alpine][03].
2727

2828
## Debian
2929

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

3232
[!INCLUDE [Debian support](../../includes/debian-support.md)]
3333

34-
For more information, see [Install PowerShell on Debian][14].
34+
For more information, see [Install PowerShell on Debian][04].
3535

3636
## Red Hat Enterprise Linux (RHEL)
3737

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

4040
[!INCLUDE [RHEL support](../../includes/rhel-support.md)]
4141

42-
For more information, see [Install PowerShell on RHEL][17].
42+
For more information, see [Install PowerShell on RHEL][06].
4343

4444
## Ubuntu
4545

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

4848
[!INCLUDE [Ubuntu support](../../includes/ubuntu-support.md)]
4949

50-
For more information, see [Install PowerShell on Ubuntu][18].
50+
For more information, see [Install PowerShell on Ubuntu][07].
5151

5252
## Community supported distributions
5353

@@ -61,20 +61,20 @@ To be supported by Microsoft, the Linux distribution must meet the following cri
6161
- The version of the distribution isn't an interim release or equivalent.
6262
- The PowerShell team has tested the version of the distribution.
6363

64-
For more information, see [Community support for PowerShell on Linux][06].
64+
For more information, see [Community support for PowerShell on Linux][02].
6565

6666
## Alternate installation methods
6767

6868
There are three other ways to install PowerShell on Linux, including Linux distributions that aren't
6969
officially supported. You can try to install PowerShell using the PowerShell Snap Package. You can
7070
also try deploying PowerShell binaries directly using the Linux `tar.gz` package. For more
71-
information, see [Alternate ways to install PowerShell on Linux][15].
71+
information, see [Alternate ways to install PowerShell on Linux][05].
7272

7373
<!-- link references -->
74-
[05]: ../PowerShell-Support-Lifecycle.md
75-
[06]: community-support.md
76-
[13]: install-alpine.md
77-
[14]: install-debian.md
78-
[15]: install-other-linux.md
79-
[17]: install-rhel.md
80-
[18]: install-ubuntu.md
74+
[01]: ../PowerShell-Support-Lifecycle.md
75+
[02]: community-support.md
76+
[03]: install-alpine.md
77+
[04]: install-debian.md
78+
[05]: install/alternate-install-methods.md
79+
[06]: install-rhel.md
80+
[07]: install-ubuntu.md

0 commit comments

Comments
 (0)