1、进入ubuntu的命令界面,输入命令获取微软的软件包工具,具体命令如图所示
2、完毕后,输入命令安装微软软件包工具do apt-get install ./packages-microsoft-prod.deb
3、输入命令更新ubuntu系统的软件包注册列sudo apt update
4、更新完毕,输入命令安装powershelludo apt-get install -y powershell
5、powershell安装完毕,输入“pwsh”命令进入powershell的命令模式,可以开始使用powersehll命令在ubuntu中执行了
6、Powersehll命令通常由 "动词-名词" 构成,如Get-Location获取当前路径,我们可以通过命令Get-Command获取Powershell所支持的命令列表,如图所示