Installing PowerShell on CentOS

Source: Internet
Author: User

Microsoft has just open source PowerShell, which is now installed on both Linux and MacOS. The specific links are as follows:

Https://github.com/PowerShell/PowerShell

This article describes how to install PowerShell under CentOS 7.2.

First download the PowerShell installation package under CentOS:

wget https://github.com/powershell/powershell/releases/download/v6.0.0-alpha.9/ powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm or:wget https://  hweast.blob.core.chinacloudapi.cn/soft/powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm

Install times wrong:

RPM-IVH powershell-6.0. 0_alpha. 9-1. El7.centos.x86_64.rpmwarning:powershell-6.0. 0_alpha. 9-1. El7.centos.x86_64.rpm:Header V3 rsa/SHA256 Signature, key ID be1229cf:NOKEYerror:Failed Dependencies:libunwind is needed by PowerShell-6.0. 0_alpha. 9-1. x86_64 Libicu is needed by PowerShell-6.0. 0_alpha. 9-1. x86_64

You need to install two dependent packages via Yum:

Yum Install -y libunwind Libicu

After the installation is complete, run the RPM installation again successfully.

RPM-IVH powershell-6.0. 0_alpha. 9-1. El7.centos.x86_64.rpmwarning:powershell-6.0. 0_alpha. 9-1. El7.centos.x86_64.rpm:Header V3 rsa/SHA256 Signature, key ID be1229cf:nokeypreparing ... # # # ############################## [%/ Installing ... 1:p owershell-6.0. 0_alpha. 9-1 ################################# [%]

After success, you can run PowerShell to start the PowerShell environment:

[[Email protected] ~]# powershellpowershellcopyright (C) .Microsoft Corporation. All rights reserved. PS/root> get-module Moduletype Version Name exportedcommands---------- ------- ---- ----------------Manifest3.1.0.0Microsoft.PowerShell.Utility {add-member, Add-type, clear-variable, compare-Object ...} Script1.2Psreadline {get-psreadlinekeyhandler, get-psreadlineoption, Remove-psreadlinekeyhandler, Set-Psreadlinekey ... PS/root> get-psrepository Name installationpolicy sourcelocation---- ------------------ --------------Psgallery untrusted https://www.powershellgallery.com/api/v2/

Installing PowerShell on CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.