How to install PowerShell on Arch Linux, Manjaro, BlackArch
March 25, 2021
PowerShell on Linux
PowerShell is a cross-platform automation and configuration tool/platform. PowerShell has a large number of system administration-oriented commands. But at the same time, PowerShell is a full-fledged programming language that allows you to write functional programs (scripts).
Note that PowerShell 5 is currently preinstalled on Windows by default, but this manual shows the installation of the latest version of PowerShell 7. On Windows, you can also install PowerShell 7.
Due to the differences between Windows and Linux operating systems, not all PowerShell functions work on Linux.
Installing PowerShell 7 on Arch Linux, Manjaro, BlackArch
It is recommended to install the pikaur utility according to the article “Automatic installation and update of AUR packages” and then just run the command:
pikaur -S powershell-bin
If you don't want to install pikaur, then run the following command sequence to install PowerShell:
git clone https://aur.archlinux.org/powershell-bin.git cd powershell-bin makepkg -si
How to run PowerShell on Arch Linux, Manjaro, BlackArch
To start an interactive PowerShell session, run the command:
Linux PowerShell Examples
To list all PS commands on your computer, open PowerShell (pwsh command), and enter there:
It is possible to filter the information displayed by the Get-Command command. Let's say you want to see PowerShell commands containing the word “Alias”, for this you need to run the following command:
Get-Command -Name *Alias
To display help about a command (cmdlet) use the following:
For example, to display help about the Get-Alias cmdlet:
To get the most complete help on Get-Command, do the following:
Get-Help Get-Command -Full
To display the contents of a folder (in this case the root of the file system), run:
To list processes run:
To stop the process with ID 10500 use the command as shown below:
Get-Process -Id 10500 | Stop-Process
See also “Linux PowerShell Basics (Beginner's Guide)”.
- How to install PowerShell in Linux Mint (87.5%)
- Linux PowerShell Basics (Beginner's Guide) (75%)
- How to completely uninstall a package along with dependencies on Arch Linux (as well as BlackArch and Manjaro) (62.5%)
- How to view package information in Arch Linux (BlackArch, Manjaro) (62.5%)
- How to change the login shell in Linux. chsh instruction (62.5%)
- Password and unix_socket authentication in MySQL and MariaDB. Error “#1698 - Access denied for user ‘root’@’localhost’” (SOLVED) (RANDOM - 50%)