How to do it...

On CentOS 7.x, perform the following steps:

  1. Register the Microsoft RPM repository:
curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo.
  1. Install the package: sudo yum install -y powershell.
  2. Run PowerShell by executing pwsh, which is now installed.

On Ubuntu 18.10, perform the following steps:

  1. Open the Ubuntu Software store.
  2. Search for powershell:
  1. Install and run PowerShell Core:

The steps to install PowerShell on other distributions are fairly similar as long as you ...

Get Powershell Core 6.2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.