PowerShell一般是指Windows PowerShell,它是一種跨平臺的任務(wù)自動(dòng)化解決方案,由命令行shell、腳本語(yǔ)言和配置管理框架組成。本文將介紹下如何在Debian服務(wù)器上安裝PowerShell。
Debian服務(wù)器安裝PowerShell有多種方法,例如在GitHub官網(wǎng)的PowerShell頁(yè)面下載適合Debian服務(wù)器的相關(guān)安裝包,然后進(jìn)行安裝;為了簡(jiǎn)化安裝和更新,我們也可以登錄到Debian服務(wù)器,然后通過(guò)包存儲庫安裝PowerShell,Debian將APT(高級包工具)用作包管理器。
1、通過(guò)包存儲庫在Debian 11上安裝PowerShell
# Install system components
sudo apt update && sudo apt install -y curl gnupg apt-transport-https# Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –# Register the Microsoft Product feed
sudo sh -c ‘echo “deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main” > /etc/apt/sources.list.d/microsoft.list’# Install PowerShell
sudo apt update && sudo apt install -y powershell# Start PowerShell
pwsh
2、通過(guò)包存儲庫在Debian 10上安裝PowerShell
# Download the Microsoft repository GPG keys
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb# Update the list of products
sudo apt-get update# Install PowerShell
sudo apt-get install -y powershell# Start PowerShell
pwsh
3、通過(guò)包存儲庫在Debian 9上安裝PowerShell
# Install system components
sudo apt-get update
sudo apt-get install -y curl gnupg apt-transport-https# Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –# Register the Microsoft Product feed
sudo sh -c ‘echo “deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main” > /etc/apt/sources.list.d/microsoft.list’# Update the list of products
sudo apt-get update# Install PowerShell
sudo apt-get install -y powershell# Start PowerShell
pwsh
我們以超級用戶(hù)身份注冊Microsoft存儲庫后,可以通過(guò)sudo apt-get install powershell命令更新PowerShell。
拓展閱讀:《Fedora Linux安裝PowerShell的簡(jiǎn)單方法介紹》
來(lái)源鏈接:https://www.idcspy.com/51950.html
本站聲明:網(wǎng)站內容來(lái)源于網(wǎng)絡(luò ),如有侵權,請聯(lián)系我們,我們將及時(shí)處理。
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自本網(wǎng)站內容采集于網(wǎng)絡(luò )互聯(lián)網(wǎng)轉載等其它媒體和分享為主,內容觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如侵犯了原作者的版權,請告知一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容,聯(lián)系我們QQ:712375056,同時(shí)歡迎投稿傳遞力量。
Copyright ? 2009-2022 56dr.com. All Rights Reserved. 特網(wǎng)科技 特網(wǎng)云 版權所有 特網(wǎng)科技 粵ICP備16109289號
域名注冊服務(wù)機構:阿里云計算有限公司(萬(wàn)網(wǎng)) 域名服務(wù)機構:煙臺帝思普網(wǎng)絡(luò )科技有限公司(DNSPod) CDN服務(wù):阿里云計算有限公司 百度云 中國互聯(lián)網(wǎng)舉報中心 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證B2
建議您使用Chrome、Firefox、Edge、IE10及以上版本和360等主流瀏覽器瀏覽本網(wǎng)站