
上QQ阅读APP看书,第一时间看更新
How to do it...
On CentOS 7.x, perform the following steps:
- Register the Microsoft RPM repository:
curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo.
- Install the package: sudo yum install -y powershell.
- Run PowerShell by executing pwsh, which is now installed.
On Ubuntu 18.10, perform the following steps:
- Open the Ubuntu Software store.
- Search for powershell:

- Install and run PowerShell Core:

The steps to install PowerShell on other distributions are fairly similar as long as you can use your distribution's package management system, such as rpm or dpkg.