
在Ubuntu 20.04 LTS Focal Fossa上安装PowerShell步骤1.首先,通过apt在终端中运行以下以下命令,确保所有系统软件包都是最新的。
sudo apt update sudo apt upgrade
步骤2.安装Snap。
运行以下命令以在Ubuntu系统上安装Snap:
sudo apt install snap
步骤3.在Ubuntu 20.04上安装PowerShell。
使用Snap安装PowerShell:
sudo snap install PowerShell --classicPowerShell --classic
安装成功后,只需pwsh在提示符下发出以下命令“ ”即可运行PowerShell :
$ pwsh PowerShell 6.2.3PowerShell 6.2.3 Copyright (c) Microsoft Corporation. All rights reserved.Copyright (c) Microsoft Corporation. All rights reserved. https://aka.ms/pscore6-docs://aka.ms/pscore6-docs Type \'help\' to get help.Type \'help\' to get help.
恭喜你!您已经成功安装了PowerShell。感谢您使用本教程在Ubuntu 20.04 LTS(Focal Fossa)系统上安装最新的稳定版Microsoft PowerShell。有关其他帮助或有用信息,我们建议您检查PowerShell的官方网站。