Powershell: WSL Ubuntu 18.04 powershell-preview package not registering pwsh on PATH

Created on 5 Oct 2019  路  2Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

Following the instructions from here: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6#ubuntu-1804

If you install powershell and attempt to execute pwsh immediately after, the appplication works flawlessly.

If you install powershell-preview in the _exact same way_, the installation completes.. and then fails to register pwsh to the PATH. This occurs regardless of whether you've previously installed the stable version of PowerShell. Attempting to invoke pwsh after installation simply fails with a command not found error (if you haven't already installed the stable version) or will execute the previously installed stable version instead (if you have).

Am I missing something here? :/

Expected behavior

Able to execute pwsh directly after finishing sudo apt-get install powershell-preview

Actual behavior

Command not found error.

Environment data

WSL Ubuntu 18.04, installing powershell-preview (v7-preview4 I assume?)

Issue-Question Resolution-Answered

All 2 comments

Try running pwsh-preview, this allows PowerShell 6 and 7 preview to be installed side by side. This is something that could be documented more prominently, right now pwsh-preview is mentioned only in Installation via Snap section.

That was it! Thanks! 馃槉

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DarwinJS picture DarwinJS  路  65Comments

msftrncs picture msftrncs  路  62Comments

Ciantic picture Ciantic  路  90Comments

NJ-Dude picture NJ-Dude  路  64Comments

dragonwolf83 picture dragonwolf83  路  127Comments