Linux(Kali\Ubuntu\CentOS\arm-Linux)安装Powershell

文章目录

  • Linux(Kali\Ubuntu\CentOS\arm-Linux)安装Powershell
    • 启动Powershell
    • Kali
    • Ubuntu
    • CentOS
    • arm-Linux离线安装
    • 参考链接

Linux(Kali\Ubuntu\CentOS\arm-Linux)安装Powershell

启动Powershell

pwsh

Kali

apt update && apt -y install powershell

Ubuntu

# 更新包列表
sudo apt-get update
# 安装必备包。
sudo apt-get install -y wget apt-transport-https software-properties-common
# 下载 Microsoft 存储库 GPG 密钥
wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
# 注册 Microsoft 存储库 GPG 密钥
sudo dpkg -i packages-microsoft-prod.deb
# 添加 packages.microsoft.com 后更新包列表
sudo apt-get update
# 安装 PowerShell
sudo apt-get install -y powershell
# 启动 PowerShell
pwsh

CentOS

下载链接:https://github.com/PowerShell/PowerShell/

yum install powershell-7.2.5-1.rh.x86_64.rpm 

arm-Linux离线安装

下载链接:https://github.com/PowerShell/PowerShell/releases

复制文件powershell-7.2.13-linux-arm64
vi /etc/profile
	export PWSH=/root/powershell-7.2.13-linux-arm64
./pwsh

export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1  (解决启动报错:需要安装libicu)

参考链接

在 Ubuntu 上安装 PowerShell - PowerShell | Microsoft Docs
PowerShell下载/PowerShell: PowerShell for every system! (github.com)

你可能感兴趣的:(Powershell,Linux)