
上QQ阅读APP看书,第一时间看更新
Installing from the repository
Ubuntu 16.04 and Ubuntu 18.04 have the stable release of PowerShell available. Follow these steps if you wish to install PowerShell on Ubuntu:
- Download the GPG keys for the Microsoft repository:
$ # On Ubuntu 16.04 $ wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb $ # On Ubuntu 18.04 $ wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
- Register the GPG keys:
$ sudo dpkg -i packages-microsoft-prod.deb
- Update the package list using the following command:
$ sudo apt update
- Install PowerShell using apt-get:
$ # To install PowerShell (stable) $ sudo apt install -y powershell $ # To install PowerShell (preview) $ sudo apt install -y powershell-preview
- Run PowerShell using the following command:
$ # If you installed PowerShell (stable) $ pwsh $ # If you installed PowerShell (preview) $ pwsh-preview