Powershell is a cross-platform task automation tool that comprises a command-line shell, a scripting language, and a configuration management framework. PowerShell runs on Windows, Linux, and macOS. Previously, it was known as Windows Powershell. It was made open-source and cross-platform in 2016. Before that, it was made to be used on Windows only.
Here at LinuxAPT, we shall look into how to install Microsoft PowerShell on our Manjaro Linux machine.
To see how can you install Microsoft Powershell on Ubuntu 20.04, visit: https://linuxapt.com/blog/162-install-microsoft-powershell-on-ubuntu-20-0
1. Clone AUR repository
Start by cloning the AUR repository of Snapd packet manager in our system with the command mentioned below:
$ git clone https://aur.archlinux.org/snapd.git
2. Build the cloned package
Here, we will build the package that we just cloned in the previous step. To do that first go to snapd directory where we cloned the package with this command:
$ cd snapd
After that run the following command to build the package:
$ makepkg -si
3. Enable Snapd socket
After building the package, we will enable the snapd socket which is responsible for managing the main snap communication socket with the below command:
$ sudo systemctl enable --now snapd.socket
4. Create link between /var/lib/snapd/snap /snap
Here, we will enable classic snap support by running the command to create a symbolic link between /var/lib/snapd/snap /snap:
$ sudo ln -s /var/lib/snapd/snap /snap
5. Install Powershell on the system
Now, we will finally install Powershell on our system by running the following command:
$ sudo snap install powershell --classic
6. Verify Powershell Installation
Now we have to verify whether the installation process went smoothly and the Powershell application was properly downloaded or not. To do that, we will check if the application exists on our system and are we able to use it.
Next, open it to see if it is working fine.
You can uninstall Powershell from our system with the help of the below simple one-line command:
$ sudo snap remove powershell
This article covers how to install Microsoft Powershell on Manjaro Linux. Infact, Powershell consists of a cross-platform command-line shell and associated scripting language.