Guides 11792 Published by

Here’s a step‑by‑step walkthrough that shows how to pull Microsoft’s official PowerShell package and get it running on Fedora 35 without any trial‑and‑error or third‑party tweaks. First, make sure the dnf‑plugins‑core package is installed so you can add repositories via config‑manager; then import Microsoft’s GPG key and register the correct repo URL that points to the fedora‑35 channel. Once the metadata is refreshed, a simple “dnf install -y powershell” pulls the binary along with any missing ICU libraries that the RPM demands, letting the installer finish in under a minute. Finally, verify that /usr/bin/pwsh exists and run “pwsh --version”; from there you can rely on Fedora’s normal update cycle to keep the shell patched as newer releases roll out.




Install PowerShell on Fedora 35 in Minutes

Want to bring the full PowerShell experience to your Fedora box?

This guide shows you how to pull the latest stable package from Microsoft’s own repo and get it up and running, no trial‑and‑error or third‑party hacks required.

1. Prerequisites: Make sure dnf‑plugins-core is ready

Before you can add new repos, Fedora needs the plugin that lets you install them with a single command.

sudo dnf install -y dnf-plugins-core

The config-manager subcommand comes from this package and it’s the cleanest way to create or remove repo files without touching /etc/yum.repos.d/ by hand.

2. Add Microsoft’s GPG key

The packages are signed, so we need to trust Microsoft’s signing key.

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

If you see a “key already exists” warning on subsequent runs, that’s fine – it just means the key is already in your RPM database.

3. Register the PowerShell repository

Fedora’s dnf can pull from any repo as long as you give it a file with the right syntax. Let dnf create one for you.

sudo dnf config-manager --add-repo https://packages.microsoft.com/yumrepos/microsoft-fedora-35-prod.repo

A quick note: On Fedora 35 the Microsoft repo is labelled fedora‑35. If you ever switch to a newer Fedora release, you’ll need to update the repo name accordingly.

4. Refresh metadata and install PowerShell

Now that dnf knows where to look, grab the package.

sudo dnf install -y powershell

During installation you might hit a dependency like libicu-. That just means your system is missing the ICU libraries; dnf will automatically pull them for you.

> I’ve seen this happen after a fresh Fedora 35 install – the repo advertises PowerShell 7.3, but the RPM pulls in libicu‑67, which wasn’t installed yet. Once the package manager fetched it, everything settled and the install finished in less than a minute.

5. Verify the installation

Open a terminal and type:

pwsh --version

You should see something like PowerShell 7.x.x printed out. If you get “command not found”, double‑check that /usr/bin/pwsh exists; the RPM always puts it there.

6. Optional: Keep PowerShell up to date

Fedora’s update cycle will now keep PowerShell in sync with Microsoft’s releases, so a simple:

sudo dnf update -y

will bring you newer patches without extra hassle.

Gotchas and quick fixes
Symptom Quick Fix
ERROR: cannot find a valid baseurl for repo 'microsoft-fedora-35-prod' Make sure your machine can reach the internet; check if a proxy is blocking HTTPS to packages.microsoft.com
Missing libgcc_s.so.1 error during install Install it with sudo dnf install libgcc. Fedora 35 ships it by default, but older minimal spins may drop it
PowerShell starts but exits immediately Try running pwsh -NoLogo -Command Get-Process to see if the shell is actually launching; a corrupted binary will just die

That’s all there is to it. Install once, use PowerShell for scripting or remote admin, and let Fedora handle the rest.