PowerShell 7 for Termux, with pkg.
An apt repository that follows Microsoft’s PowerShell releases, checks each one against Microsoft’s published hash, makes it run on Termux’s glibc, signs it, and publishes it. You install and update it like any other package.
curl -fsSL https://pwsh-termux.machlev.org/pwsh-termux.gpg \
-o $PREFIX/etc/apt/trusted.gpg.d/pwsh-termux.gpg
echo "deb https://pwsh-termux.machlev.org stable main" \
> $PREFIX/etc/apt/sources.list.d/pwsh-termux.list
pkg update && pkg install pwsh
Needs Termux on an arm64 (aarch64) device with the glibc repository (pkg install glibc-repo). Step by step, with checks →
What you get
Stable and preview
pwsh follows Microsoft’s newest stable release; pwsh-preview follows the newest preview or release candidate, when one is newer than stable.
Updated by itself
A daily workflow looks for new releases, so pkg upgrade brings them in, usually within a day of Microsoft publishing.
Verified
Every download is checked against the SHA-256 in Microsoft’s own hashes.sha256 before it is packaged.
Signed
The repository index is signed with an Ed25519 key; apt checks it on every pkg update.
Made for Termux
The binary is patched to use Termux’s glibc loader, so it runs directly: no proot, no extra launcher.
Open and archived
The scripts are public, and every built .deb is kept as a GitHub release asset.
Channels
| Package | Command | Follows |
|---|---|---|
pwsh | pwsh | The highest stable PowerShell 7 release |
pwsh-preview | pwsh-preview | The highest preview or release candidate, only while it is newer than stable (they install side by side) |