PowerShell Core is a cross-platform (Windows, Linux, and macOS) automation and configuration tool/framework that works well with your existing tools and is optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. It includes a command-line shell, an associated scripting language, and a framework for processing cmdlets.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related PowerShell queries.
In this context, we shall look into how to install PowerShell on Ubuntu 20.04 LTS.
Steps to install PowerShell on Ubuntu 20.04 LTS Focal Fossa
1. Perform System Update
First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal:
$ sudo apt update
$ sudo apt upgrade
2. Install Snap
Run the following command to install Snap on the Ubuntu system:
$ sudo apt install snap
3. Install PowerShell on the system
Install PowerShell using Snap:
$ sudo snap install PowerShell --classic
Once the installation was successful, you can run the PowerShell, by just issuing this command "pwsh" in the prompt:
Copyright (c) Microsoft Corporation. All rights reserved.
Type 'help' to get help.
[Need help in installing any Software on your Linux system ? We can help you. ]