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
PS /> uname -v
#56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019
PS /> Get-Host | Select-Object Version


PS />

My powershell test script:

sleep 1
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:
sudo dpkg -i powershell_6.2.0-1.ubuntu.18.04_amd64.deb
sudo apt-get install -f
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