How to Install Powershell on CentOS Linux | Linux Today

How to Install Powershell on CentOS Linux

Written By
b
buildvirtual
Dec 11, 2020

Due to the release of Powershell Core, you can install powershell core and run PowerCLI commands on a Linux host. This will be a quick post to cover the steps required to get it installed.

Install Powershell on CentOS
The first step is to add the Microsoft repo to your Centos machine:

curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
Once done, Powershell can be downloaded and installed using Yum:

yum install -y powershell
When the install is complete you can run Powershell by running ???pwsh???:

[root@linux usr]# pwsh
PowerShell 6.2.3
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type ‘help’ to get help.

PS /usr
I have also written a separate post on this here, where you can see some examples of running powershell on linux.

b

buildvirtual

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.