Install PowerShell 7 Preview on Amazon Linux 2

In this blog post, I will show you how to install PowerShell 7 on Amazon Linux 2 and the latest PowerShell version.

About Amazon Linux 2

Amazon Linux is the next-generation version on Amazon AWS Linux distribution OS that is optimized for running workloads in AWS.

Get Started

To get started, log in to your Amazon Linux 2 and run the following command.

curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo

Next, Install the latest preview release using the line below:

sudo yum install -y powershell-preview

When done, you can run PowerShell 7 using the following command.

Please note that installing the preview edition (7) will not affect the existing version already installed.

pwsh-preview

Processing…
Success! You're on the list.

Posted

in

by