Sunday, June 30, 2019

Powershell 6.2.1 running on Ubuntu

PS />
PS /> $StopWatch=[system.diagnostics.stopwatch]::startNew()
PS /> sleep 1
PS /> $StopWatch.Stop()
PS /> $StopWatch.Elapsed.TotalSeconds
1.0523255
PS /> uname -v
#56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019
PS /> Get-Host | Select-Object Version

Version
-------
6.2.1

PS />

My powershell test script:

$StopWatch=[system.diagnostics.stopwatch]::startNew()
sleep 1
$StopWatch.Stop()
$StopWatch.Elapsed.TotalSeconds
uname -v
Get-Host | Select-Object Version
 

Only "Direct Download" worked for my Ubuntu 18.04. Interesting!

Guides from Microsoft:

Installation via Direct Download - Ubuntu 18.04

Download the Debian package powershell_6.2.0-1.ubuntu.18.04_amd64.deb from the releases page onto the Ubuntu machine.
Then execute the following in the terminal:
sh
sudo dpkg -i powershell_6.2.0-1.ubuntu.18.04_amd64.deb
sudo apt-get install -f
 Note
The dpkg -i command fails with unmet dependencies. The next command, apt-get install -f resolves these issues then finishes configuring the PowerShell package.

No comments:

Post a Comment