Installing PowerShell on Linux and macOS
We’ll first look at the methods for installing PowerShell on Linux, and then look at how to install it on macOS.
Installing PowerShell on Linux via a snap Package
The snapd
system is a universal software packaging system that was invented by the developers of Ubuntu. It comes installed by default on Ubuntu operating systems, and can be installed on most other Linux distros.
If you’re setting up a new Ubuntu Server, you can choose to install a selection of snap packages, including PowerShell, from the Ubuntu installer. Here’s what that looks like:
Figure 23.1: Selecting the PowerShell snap package during Ubuntu installation
You can install snapd
on non-Ubuntu distros, but the installation instructions vary for different distros. You can find the installation instructions here:
https://snapcraft.io/docs/installing-snapd
Once you’ve installed snapd
, you can install PowerShell...