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 (80.8%)
- Error “cannot resolve dependency lib32 (32-bit library)” (SOLVED) (69.2%)
- “Error: failed to commit transaction (invalid or corrupted package)” (SOLVED) (69.2%)
- Errors “Incorrect definition of table mysql.event: expected column 'definer' at position 3 to have type varchar(, found type char(141)” and “Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler” (SOLVED) (69.2%)
- Linux PowerShell Basics (Beginner's Guide) (68.5%)
- The in-memory file system - how to use tmpfs (RANDOM - 50%)