You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use aliases like "sort" in Windows...in PowerShell for Linux do local exes in the path take precedence over aliases? Perhaps "sort" is missing.
There are 155 aliases in PowerShell for Windows and 113 on Ubuntu. That's a pretty big gap.
PS /home/scott/Desktop> Get-Process | Sort VM -desc | Select -first 5 | Format-Table
Sort : The term 'Sort' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:15
Correct, this was a requested change. Please see #567 and #786; the former has a snippet to add the aliases back if you desire them. You can place that in your ~/powershell/profile.ps1.
I should say that they don't actually take precedence (in fact, the aliases will take precedence); but it was because of this behavior that we removed them.
Hi
I have the same problem on Ubuntu 20.04 and Powershell 7.1. Is there any way to fix that? I see that the reporting date is for five years ago.
15 | … | Select VM, IPAddress , @{N='Notes';E={$_.VM.Notes}} | Sort -Proper …
| ~~~~
| The term 'Sort' is not recognized as a name of a cmdlet, function, script file, or executable
| program. Check the spelling of the name, or if a path was included, verify that the path is
| correct and try again.
Activity
andyleejordan commentedon Apr 13, 2016
Correct, this was a requested change. Please see #567 and #786; the former has a snippet to add the aliases back if you desire them. You can place that in your
~/powershell/profile.ps1.andyleejordan commentedon Apr 13, 2016
I should say that they don't actually take precedence (in fact, the aliases will take precedence); but it was because of this behavior that we removed them.
mahmoodn commentedon May 12, 2021
Hi
I have the same problem on Ubuntu 20.04 and Powershell 7.1. Is there any way to fix that? I see that the reporting date is for five years ago.
Some information are shown below
mahmoodn commentedon May 12, 2021
OK I followed the topics and the solution is to use
Sort-Objectinstead ofSort.