以下是在 CentOS 7 安装 微软 PowerShell 的步骤:
1. 安装 wget
首先安装 wget 用作下载 PowerShell, 如果有安装 curl, 用 curl 代替也可以:
# yum install wget
1. 安装 PowerShell
现在可以下载 PowerShell 的 Repo:
# wget -O /etc/yum.repos.d/microsoft.repo https://packages.microsoft.com/config/rhel/7/prod.repo
安装 PowerShell:
# yum -y install powershell
安装好 PowerShell 后, 可以执行 PowerShell 指令进入 PowerShell:
|
1 2 3 4 |
$ PowerShell PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS /root > |
要离开只要输入 “exit” 即可.