我已经在 ubuntu 16.04 中安装了 powershell,但是当我在终端中键入 powershell 时,它说找不到命令,我该如何解决这个问题?

Afl*_*lah 4 package-management command-line apt

我已经powershell从我从powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.debGitHub 下载的包中安装并输入了以下命令:

sudo apt-get install libunwind8 libicu55
sudo dpkg -i powershell_6.0.0-beta.9-1.ubuntu.16.04_amd64.deb
Run Code Online (Sandbox Code Playgroud)

但是当我powershell在终端上运行时,它说没有安装依赖项。所以我删除powershell

sudo apt autoremove
Run Code Online (Sandbox Code Playgroud)

(清理未满足的依赖项)和

sudo apt purge powershell
Run Code Online (Sandbox Code Playgroud)

然后我使用以下命令再次开始安装

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

curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
sudo apt-get update
sudo apt-get install -y powershell
Run Code Online (Sandbox Code Playgroud)

但是安装完成后,我想powershell通过在终端上输入来运行它,但它说command not found

在此处输入图片说明

我该如何解决这个问题?

dig*_*kid 11

启动 powershell 的正确命令pwsh不是powershell

完整安装请参考安装Powershell