云网牛站
所在位置:首页 > Linux软件 > PowerShell Core 6.0发布下载,PowerShell的新版本

PowerShell Core 6.0发布下载,PowerShell的新版本

2018-01-11 15:28:25作者:周其稿源:开源中国

PowerShell Core 6.0 是 PowerShell 的新版本,它是跨平台的(Windows,MacOS和Linux),是开源的,并且由异构环境和混合云构建。

 

更新内容

从 .NET Framework 移到 .NET Core

PowerShell Core 使用 .NET Core 2.0 作为其运行时。.NET Core 2.0 使 PowerShell Core 能够在多个平台(Windows,MacOS和Linux)上工作。PowerShell Core 还公开了由 .NET Core 2.0 提供的用于 PowerShell cmdlet 和脚本上的 API。

Windows PowerShell 使用 .NET Framework 运行时来托管 PowerShell 引擎,公开了 .NET Framework 提供的 API 集。

 

支持macOS和Linux

Windows 7, 8.1, and 10

Windows Server 2008 R2, 2012 R2, 2016

Windows Server Semi-Annual Channel

Ubuntu 14.04, 16.04, and 17.04

Debian 8.7+, and 9

CentOS 7

Red Hat Enterprise Linux 7

OpenSUSE 42.2

Fedora 25, 26

macOS 10.12+

 

下载

要在 Windows 上下载 PowerShell Core

要在 macOS 和 Linux 上下载 PowerShell Core

 

附Ubuntu 16.04

Installation via Package Repository - Ubuntu 16.04

PowerShell Core, for Linux, is published to package repositories for easy installation (and updates). This is the preferred method.

# Import the public repository GPG keys

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

# Register the Microsoft Ubuntu repository

curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /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

After registering the Microsoft repository once as superuser, from then on, you just need to use sudo apt-get upgrade powershell to update it.

Installation via Direct Download - Ubuntu 16.04

Download the Debian package powershell_6.0.0-rc-1.ubuntu.16.04_amd64.deb from the releases page onto the Ubuntu machine.

Then execute the following in the terminal:

sudo dpkg -i powershell_6.0.0-rc-1.ubuntu.16.04_amd64.deb

sudo apt-get install -f

Please note that dpkg -i will fail with unmet dependencies; the next command, apt-get install -f resolves these and then finishes configuring the PowerShell package.

Uninstallation - Ubuntu 16.04

sudo apt-get remove powershell

 

Fedora 26

Installation via Package Repository (preferred) - Fedora 26

PowerShell Core for Linux is published to official Microsoft repositories for easy installation (and updates).

# Register the Microsoft signature key

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

# Register the Microsoft RedHat repository

curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo

# Update the list of products

sudo dnf update

# Install a system component

sudo dnf install compat-openssl10

# Install PowerShell

sudo dnf install -y powershell

# Start PowerShell

pwsh

Installation via Direct Download - Fedora 26

Download the RPM package powershell-6.0.0_rc-1.rhel.7.x86_64.rpm from the releases page onto the Fedora machine.

Then execute the following in the terminal:

sudo dnf update

sudo dnf install compat-openssl10

sudo dnf install powershell-6.0.0_rc-1.rhel.7.x86_64.rpm

You can also install the RPM without the intermediate step of downloading it:

sudo dnf update

sudo dnf install compat-openssl10

sudo dnf install https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-rc/powershell-6.0.0_rc-1.rhel.7.x86_64.rpm

Uninstallation - Fedora 26

sudo dnf remove powershell

 

相关主题

在Linux及OS X系统中安装Microsoft PowerShell

精选文章
热门文章