Install PowerShell on LMDE 5 “Elsie”
If you’ve been tinkering with Linux Mint Debian Edition (LMDE) 5 and realized the built‑in Bash scripts just aren’t cutting it, this guide will show you how to get Microsoft’s PowerShell running side‑by‑side with your usual tools. By the end you’ll have a fully functional pwsh binary that can be called from any terminal or script.
Why bother installing PowerShell on LMDE?
I first tried to run a cross‑platform CI pipeline on my Elsie machine and hit a wall when the script required PowerShell modules. The distro’s repositories don’t ship PowerShell, so you’re forced to pull it from Microsoft’s own packages – which are surprisingly well‑maintained for Debian‑based systems.
Prerequisites
- A fresh LMDE 5 install with internet access
- Basic sudo privileges (you’ll need them to add a repository and install packages)
If your system is still running the default kernel from the 2023 release, you’re good to go. Older kernels can cause compatibility warnings during the package installation.
Step‑by‑step installation
Add Microsoft’s package signing key
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
The key lets APT verify that the PowerShell packages really come from Microsoft and haven’t been tampered with.
Register the repository
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/powershell stable main" > /etc/apt/sources.list.d/microsoft-powershell.list'
LMDE ships with apt just like Debian, so dropping a .list file into /etc/apt/sources.list.d is the cleanest way to point it at Microsoft’s repo.
Update the package index
sudo apt update
This pulls down the latest metadata, including the newly added PowerShell entries.
Install the actual PowerShell package
sudo apt install -y powershell
The -y flag skips the confirmation prompt – handy when you’re scripting the whole setup.
Verify the installation
pwsh -Version
You should see something like PowerShell 7.4.0. If the command isn’t found, double‑check that /usr/bin/pwsh exists and that your $PATH includes it (it usually does by default).
Optional: Enable PowerShell as a login shell
If you plan to spend most of your day in pwsh, you can make it your default login shell:
chsh -s /usr/bin/pwsh
Log out and back in, then you’ll be greeted by the familiar blue prompt instead of Bash. I’ve found this useful for testing scripts that rely on PowerShell’s strict mode, but don’t forget you can always switch back with chsh -s /bin/bash.
Common pitfalls
Missing dependencies – On a freshly installed LMDE I ran into an error about libssl1.1. The fix was to install the compatibility package:
sudo apt install libssl1.1
Newer Debian‑based distros ship OpenSSL 3, which PowerShell still expects the older library for some modules.
Snap vs. APT – Some tutorials suggest pulling PowerShell from Snapcraft. In practice Snap adds an extra layer of abstraction and can be a performance hit on low‑end hardware. Stick with the official APT repo unless you have a compelling reason to use Snap.
Keeping PowerShell up to date
Because we added Microsoft’s repository, apt upgrade will automatically pull newer PowerShell releases along with your regular system updates. No need for manual downloads or fiddling with tarballs.
That’s it – you now have a fully functional PowerShell on LMDE 5 ready for automation, cross‑platform scripting, or just satisfying that weird curiosity about how Microsoft’s shell feels on Debian.