Install PowerShell on CentOS 8; Through this tutorial, you will learn how to install and use PowerShell on CentOS 8.
How To Install PowerShell on CentOS 8
Follow the following steps to install and use PowerShell on CentOS 8:
- Step 1 – Add PowerShell Library
- Step 2 – Install PowerShell on CentOS 8
- Step 3 – Start and Use PowerShell
Step 1 – Add PowerShell Library
First of all, open terminal and execute the following command into it to add PowerShell library in CentOS 8:
curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
Step 2 – Install PowerShell on CentOS 8
Then execute the following command on terminal to install PowerShell on CentOS 8:
sudo yum install -y powershell
And we can use rpm command reveals more information about installed PowerShell package:
rpm -qi powershell
Step 3 – Start and Use PowerShell
Once the PowerShell installation has been done, execute the following command on terminal to start PowerShell:
pwsh
Conclusion
That’s it, Through this tutorial, you have learned how to install and use PowerShell on CentOS 8.