Using Linux dpkg packager to install PowerShell 7 Preview in Ubuntu 18.04

Just another way to install PowerShell Preview beside using “apt” or “snap”.  As in this sample, you don’t need to register the package repository.

Get the Preview link

First, look under the release documentation and search for the deb package. In my case I’m install the amd64 version.

Then, right-click on the “powershell-preview_7.0.0-preview.2-1.ubuntu.18.04_amd64.deb”, and select “Copy link address“.

This will copy the following link address:

https://github.com/PowerShell/PowerShell/releases/download/v7.0.0-preview.2/powershell-preview_7.0.0-preview.2-1.ubuntu.18.04_amd64.deb

Download the Preview

Now, I go back to my linux machine and open a terminal session, and I make sure to change directory to the “Downloads” folder.

cd Downloads

Then, I type the following command and the link address:

wget https://github.com/PowerShell/PowerShell/releases/download/v7.0.0-preview.2/powershell-preview_7.0.0-preview.2-1.ubuntu.18.04_amd64.deb

Installing the Preview

Now, I’m ready to install the preview using the dpkg package installer executing the following command:

sudo dpkg -i powershell-preview_7.0.0-preview.2-1.ubuntu.18.04_amd64.deb

Now, we can start working with PowerShell.

In Summary

You can pick and choose the best way to install PowerShell. So, it really takes a few lines get the PowerShell Preview installed quickly.

Reference

Keep learning more PowerShell!