![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=1739147835-ys9usu7k0TVK9WtRiGZm7PniIZsILBjh-0-943ad1c2827d5ed5a4b99b7212820909)
- Install and run PowerShell Core:
![](https://epubservercos.yuewen.com/57DF63/19470379901495806/epubprivate/OEBPS/Images/bdee98db-8c9d-49ea-8805-fb363de591ba.png?sign=1739147835-BM6d4zz2uOdre2MrQSDWRTWh0QWBuCAH-0-eae8a829e621190afac05833dfdd41ea)
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.