以下是在 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” 即可.