![Powershell Core 6.2 Cookbook](https://wfqqreader-1252317822.image.myqcloud.com/cover/704/36698704/b_36698704.jpg)
上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:
![](https://epubservercos.yuewen.com/57DF63/19470379901495806/epubprivate/OEBPS/Images/3678780c-67d1-4ef4-aa8a-cdf88ccd8180.png?sign=1739282727-QI7a2WHlRlpoFLh4V3MNfkULFKQqD9ku-0-93330d9db6553b96685dc5a8fb0c83d2)
- Install and run PowerShell Core:
![](https://epubservercos.yuewen.com/57DF63/19470379901495806/epubprivate/OEBPS/Images/bdee98db-8c9d-49ea-8805-fb363de591ba.png?sign=1739282727-x37jZJkyDxD31UHHatzNJ6v6Skq9bYnX-0-e4b38ad2f09b3fb10ed3ab91eced7bbf)
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.