Debian服务器安装PowerShell教程(power shell安装)

Debian服务器安装PowerShell教程(power shell安装)

扫码添加渲大师小管家,免费领取渲染插件、素材、模型、教程合集大礼包!

PowerShell一般是指Windows PowerShell。它是一种跨平台的任务自动化解决方案。由命令行shell。脚本语言和配置管理框架组成。本文将介绍下如何在Debian服务器上安装PowerShell。

Debian服务器安装PowerShell有多种方法。例如在GitHub官网的PowerShell页面下载适合Debian服务器的相关安装包。然后进行安装;为了简化安装和更新。我们也可以登录到Debian服务器。然后通过包存储库安装PowerShell。Debian将APT(高级包工具)用作包管理器。

1。通过包存储库在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。通过包存储库在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。通过包存储库在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

我们以超级用户身份注册Microsoft存储库后。可以通过sudo apt-get install powershell命令更新PowerShell。

拓展阅读:《Fedora Linux安装PowerShell的简单方法介绍》

分享到 :
相关推荐

低价香港服务器租用怎么防止被攻击(租用香港服务器违法么)

低价香港服务器租用防止被攻击的方法:1。不要禁止使用服务器网络。以防导致应用不佳或登...

云服务器应该重视的安全问题有哪些(云服务器应该重视的安全问题有哪些呢)

云服务器应该重视的安全问题:1.云服务器应该重视自身存在的脆弱性问题。比如漏洞。错[...

apache和tomcat区别(apache和Tomcat区别在哪)

一般是把Apache服务器与tomcat服务器搭配在一起用Apache服务[&hel...

Tomcat服务器绑定域名教程(tomcat如何绑定域名)

Tomcat是一个小型的轻量级应用服务器。在中小型系统和并发访问用户不是很多的场合[...

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注