Centos7 安装Power Shell

Centos7 安装Power Shell
1 查看版本

# cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core) 

2 安装

# Register the Microsoft RedHat repository
curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo

# Install PowerShell
sudo yum install -y powershell

# Start PowerShell
pwsh

3 升级

sudo yum update powershell

4 卸载

sudo yum remove powershell

资料:https://docs.microsoft.com/zh-cn/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6

原文地址:https://www.cnblogs.com/jiqing9006/p/9967720.html