Skip to content

Support for Ubuntu 26.04 #27388

Open
Open

Description

@pefoo

Prerequisites

Steps to reproduce

Try to install pwsh on ubuntu 26.04 using the official docs

#!/bin/bash
###################################
# Prerequisites

# Update the list of packages
sudo apt-get update

# Install pre-requisite packages.
sudo apt-get install -y wget apt-transport-https software-properties-common

# Get the version of Ubuntu
source /etc/os-release

# Download the Microsoft repository keys
wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb

# Register the Microsoft repository keys
sudo dpkg -i packages-microsoft-prod.deb

# Delete the Microsoft repository keys file
rm packages-microsoft-prod.deb

# Update the list of packages after we added packages.microsoft.com
sudo apt-get update

###################################
# Install PowerShell
sudo apt-get install -y powershell

# Start PowerShell
pwsh

Expected behavior

Pwsh is installed

Actual behavior

E: Unable to locate package powershell

Error details

Hit:1 http://security.ubuntu.com/ubuntu resolute-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu resolute InRelease                                                                       
Hit:3 http://archive.ubuntu.com/ubuntu resolute-updates InRelease                                                               
Hit:4 https://download.docker.com/linux/ubuntu resolute InRelease   
Hit:5 http://archive.ubuntu.com/ubuntu resolute-backports InRelease 
Hit:6 https://packages.microsoft.com/ubuntu/26.04/prod resolute InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
wget is already the newest version (1.25.0-2ubuntu4).
apt-transport-https is already the newest version (3.2.0).
software-properties-common is already the newest version (0.120).
Solving dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-7.0.0-14 linux-headers-7.0.0-14-generic linux-image-unsigned-7.0.0-14-generic linux-main-modules-zfs-7.0.0-14-generic linux-modules-7.0.0-14-generic linux-tools-7.0.0-14 linux-tools-7.0.0-14-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
(Reading database… 140251 files and directories currently installed.)
Preparing to unpack packages-microsoft-prod.deb…
Unpacking packages-microsoft-prod (1.2-ubuntu26.04) over (1.2-ubuntu26.04)…
Setting up packages-microsoft-prod (1.2-ubuntu26.04)…
File /usr/share/keyrings/microsoft-prod.gpg is missing. Installing...
Hit:1 http://security.ubuntu.com/ubuntu resolute-security InRelease
Hit:2 https://packages.microsoft.com/ubuntu/26.04/prod resolute InRelease                       
Hit:3 http://archive.ubuntu.com/ubuntu resolute InRelease                                       
Hit:4 http://archive.ubuntu.com/ubuntu resolute-updates InRelease                               
Hit:5 https://download.docker.com/linux/ubuntu resolute InRelease
Hit:6 http://archive.ubuntu.com/ubuntu resolute-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package powershell
Command 'pwsh' not found, did you mean:
  command 'wsh' from deb wcc (0.0.7+dfsg-2build2)
  command 'posh' from deb posh (0.14.3)
  command 'pdsh' from deb pdsh (2.35-3)
  command 'ppsh' from deb ppsh (1.10-5)
Try: sudo apt install <deb name>

Environment data

PRETTY_NAME="Ubuntu 26.04 LTS"
NAME="Ubuntu"
VERSION_ID="26.04"
VERSION="26.04 (Resolute Raccoon)"
VERSION_CODENAME=resolute
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=resolute
LOGO=ubuntu-logo

Visuals

No response

Pinned by kilasuit

Activity

  1. added
    Needs-TriageThe issue is new and needs to be triaged by a work group.
    on May 2, 2026
  2. 237dmitry commented on May 2, 2026

    @237dmitry

    If I was using Ubuntu, I would install powershell using snapd. Or manually from tar.gz

    https://snapcraft.io/powershell

    Snapcraft
    Get the latest version of PowerShell for Linux - PowerShell for every system!
  3. SirWobbyTheFirst commented on May 2, 2026

    @SirWobbyTheFirst

    If I was using Ubuntu, I would install powershell using snapd. Or manually from tar.gz

    https://snapcraft.io/powershell

    Snapcraft**Install PowerShell on Linux | Snap Store**Get the latest version of PowerShell for Linux - PowerShell for every system!

    Not appropriate, PowerShell on Snap is locked down with a read-only file system and you cannot use the PSWSMan module to enable WSMan support for interacting with Windows machines.

    Snapcraft
    Get the latest version of PowerShell for Linux - PowerShell for every system!
  4. SirWobbyTheFirst commented on May 2, 2026

    @SirWobbyTheFirst

    pefoo (@pefoo) - Have you tried it when pulling down the 24.04 package for now?

  5. 237dmitry commented on May 2, 2026

    @237dmitry

    Not appropriate

    Snap is Ubuntu way, half of packages are snaps. Otherwise, it's difficult to explain why there's a package for Debian but not for Ubuntu.

  6. pefoo commented on May 3, 2026

    @pefoo
    Author

    @pefoo - Have you tried it when pulling down the 24.04 package for now?

    tested with the current LTS (7.6.1): Works

    > $PSVersionTable
    
    Name                           Value
    ----                           -----
    PSVersion                      7.6.1
    PSEdition                      Core
    GitCommitId                    7.6.1
    OS                             Ubuntu 26.04 LTS
    Platform                       Unix
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
    PSRemotingProtocolVersion      2.4
    SerializationVersion           1.1.0.1
    WSManStackVersion              3.0
    
    > cat /etc/os-release
    PRETTY_NAME="Ubuntu 26.04 LTS"
    NAME="Ubuntu"
    VERSION_ID="26.04"
    VERSION="26.04 (Resolute Raccoon)"
    VERSION_CODENAME=resolute
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=resolute
    LOGO=ubuntu-logo
    

    I would consider this a temporary workaround. I would rather wait a bit longer and have full distribution support as this is not needed for a workstation but actual infrastructure :)

  7. kilasuit commented on May 3, 2026

    @kilasuit
    Collaborator

    Jason Helmick (@theJasonHelmick) is this currently planned?

  8. SirWobbyTheFirst commented on May 3, 2026

    @SirWobbyTheFirst

    @pefoo - Have you tried it when pulling down the 24.04 package for now?

    tested with the current LTS (7.6.1): Works

    > $PSVersionTable
    
    Name                           Value
    ----                           -----
    PSVersion                      7.6.1
    PSEdition                      Core
    GitCommitId                    7.6.1
    OS                             Ubuntu 26.04 LTS
    Platform                       Unix
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
    PSRemotingProtocolVersion      2.4
    SerializationVersion           1.1.0.1
    WSManStackVersion              3.0
    
    > cat /etc/os-release
    PRETTY_NAME="Ubuntu 26.04 LTS"
    NAME="Ubuntu"
    VERSION_ID="26.04"
    VERSION="26.04 (Resolute Raccoon)"
    VERSION_CODENAME=resolute
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=resolute
    LOGO=ubuntu-logo
    

    I would consider this a temporary workaround. I would rather wait a bit longer and have full distribution support as this is not needed for a workstation but actual infrastructure :)

    That's good, its at least better than 24.04 where PowerShell couldn't even be installed from the repo because of a missing "dependency" that had to be worked around despite not being needed. I'll probably take a gander at using the 24.04 repo for PowerShell for my lab images for now and then fix it up once the proper release happens.

  9. rhubarb-geek-nz commented on May 3, 2026

    @rhubarb-geek-nz

    If I was using Ubuntu, I would install powershell using snapd. Or manually from tar.gz

    Snap packages can't maintain the /etc/shells file, unpacking tar files was fine for last century.

    My personal preference is to use a thin PowerShell package which does not contain the dotnet runtime, Ubuntu already provides the dotnet SDK and runtime so can simply reuse that.

    This also avoids the endless ICU dependencies race by letting the dotnet SDK do that dependency. It also means that updates and fixes to the dotnet SDK don't require a re-release of PowerShell.

  10. 237dmitry commented on May 4, 2026

    @237dmitry

    Snap packages can't maintain the /etc/shells file

    I've never run pwsh as a login shell, what's the point if /bin/sh is called when logging in?

    unpacking tar files was fine for last century

    At the same time, this is the most flexible installation method. Well, if you don't take into account checking for updates.

  11. rhubarb-geek-nz commented on May 4, 2026

    @rhubarb-geek-nz

    unpacking tar files was fine for last century

    At the same time, this is the most flexible installation method. Well, if you don't take into account checking for updates.

    ... and patching. The program still doesn't have the executable rights!

    $ tar tvfz powershell-7.6.1-linux-x64.tar.gz | grep "pwsh\$"
    -rw-rw-r-- root/root     78256 2026-04-21 06:22 pwsh
    
  12. 237dmitry commented on May 4, 2026

    @237dmitry

    The program still doesn't have the executable rights!

    I do not understand why. Although I don't consider this a serious problem.

  13. pefoo commented on May 4, 2026

    @pefoo
    Author

    Can we stop discussing deployment methods for home labs please? This is a distribution request. Thank you very much.

  14. rhubarb-geek-nz commented on May 4, 2026

    @rhubarb-geek-nz

    Can we stop discussing deployment methods for home labs please? This is a distribution request. Thank you very much.

    Can I suggest you open a DSR? These requests have their own template, eg #24076

  15. pefoo commented on May 4, 2026

    @pefoo
    Author

    Can we stop discussing deployment methods for home labs please? This is a distribution request. Thank you very much.

    Can I suggest you open a DSR? These requests have their own template, eg #24076

    Sure. But there is no template available for DSRs when creating new issues

    Image
  16. 9 remaining items

  17. daxian-dbw commented on Aug 5, 2026

    @daxian-dbw
    Member

    PowerShell v7.6 is on top of .NET 10, but .NET 10 doesn't support Ubuntu 26.04 (.NET 10.0 - Supported OS versions). So, we cannot publish PowerShell to the 26.04 MS repository.

    The PR #27765 has been merged with changes to support 26.04 for PowerShell v7.7.0 preview packages. The v7.7.0-preview.4 PowerShell will have package pushed to the 26.04 repository.

  18. martincostello commented on Aug 5, 2026

    @martincostello

    PowerShell v7.6 is on top of .NET 10, but .NET 10 doesn't support Ubuntu 26.04 (.NET 10.0 - Supported OS versions).

    I don't think that's true - I think that's a mistake/omission in that page.

    /cc Rich Lander (@richlander)

  19. kilasuit commented on Aug 5, 2026

    @kilasuit
    Collaborator

    Dongbo Wang (@daxian-dbw) this page shows that .NET10 is supported on Ubuntu 26.04

    .NET is available in the Ubuntu package manager feeds. The Microsoft package repository no longer contains .NET packages for Ubuntu.

    So I can't see any reason why 7.6.x could be published for Ubuntu 26.04 too

  20. rhubarb-geek-nz commented on Aug 5, 2026

    @rhubarb-geek-nz

    So I can't see any reason why 7.6.x could be published for Ubuntu 26.04 too

    The dotnet that is part of the Ubuntu feed is built by Ubuntu and installs in /usr/lib/dotnet rather than the standard debian style /usr/share/dotnet.

    Will the PowerShell for Ubuntu be built containing its own copy of a different build of dotnet or will it be built to not include the dotnet runtime and use the existing Ubuntu provided dotnet? PowerShell could then just have a dependency on dotnet-runtime-10.0 and not on the endless list of libicu versions as that dependency would be handled by the Ubuntu provided dotnet.

    I recommend that PowerShell for Ubuntu

    • build with SelfContained=False,
    • does not ship with dotnet runtime
    • remove libicu depdendencies
    • add dependency to dotnet-runtime-10.0

    The libicu dependencies have been a continual pain point for Ubuntu PowerShell users, this is an opportunity to make it Ubuntu's problem.

    PowerShell for Mariner-CBL already takes this approach so there is precedence. I also showed the proof-of-concept in rhubarb-geek-nz/powershell-ubuntu.

  21. revpixel commented on Aug 5, 2026

    @revpixel

    to be fair, nobody's wrong here, and we've even talked about the fact that you can run 7.6.4 on 26.04

    I even have a working container you can run live from the dev branch in my public repo

    As in my case, like many others, I just installed 7.6.4 from the 24.04 Ubuntu Debian location, which you can see in my Docker build file

    https://github.com/revpixel/lily-pwsh

    docker run -it ghcr.io/revpixel/lily-pwsh:latest

    GitHub
    A clean, minimal, zero‑drift PowerShell container built on Ubuntu 24.04. - revpixel/lily-pwsh
  22. microsoft-github-policy-service commented on Sep 25, 2026

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as fixed and has not had any activity for 1 day. It has been closed for housekeeping purposes.

  23. Jaykul commented on Oct 3, 2026

    @Jaykul
    Contributor

    I'm confused how this is closed, when the problem still exists.

    PowerShell is not in the 26.04 feed, and it should be.

    Following the documentation doesn't work.

  24. microsoft-github-policy-service commented on Oct 5, 2026

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as fixed and has not had any activity for 1 day. It has been closed for housekeeping purposes.

  25. J0F3 commented on Oct 8, 2026

    @J0F3

    The documentation now states that Ubuntu 26.04 is supported: https://learn.microsoft.com/en-us/powershell/scripting/install/linux-overview?view=view=powershell-7.6#ubuntu

    However, only PowerShell 7.7 Preview is currently available for Ubuntu 26.04 on packages.microsoft.com.

    This currently prevents us from updating our Docker image to Ubuntu 26.04, which is very annoying. PowerShell is essentially the only package that is still unavailable for Ubuntu 26.04.

    When can we expect an LTS PowerShell package for Ubuntu 26.04 on packages.microsoft.com?

    Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions