Created
January 13, 2026 18:29
-
-
Save jcefoli/d58dd47c06409629a1f0f5ecf0b5d6e0 to your computer and use it in GitHub Desktop.
Install Powershell 7 on Linux (ARM64)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| METADATA=$(curl -s https://api.github.com/repos/PowerShell/PowerShell/releases/latest) | |
| VERSION=$(echo "$METADATA" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') | |
| curl -s -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v$VERSION/powershell-$VERSION-linux-arm64.tar.gz | |
| sudo mkdir -p /opt/microsoft/powershell/7 | |
| sudo tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 | |
| sudo chmod +x /opt/microsoft/powershell/7/pwsh | |
| sudo ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment