powershell, aws, amazon linux 2,

Install PowerShell on Amazon Linux 2

Oct 24, 2022 · 1 min read · Post a comment

Performing or testing cross-compatibility tools on Amazon Linux 2 can be sort of a challenging task. PowerShell packages are not taking part of the Amazon Linux 2 packages, so that’s why we will have to use a script. Let’s install PowerShell on Amazon Linux 2.

Prerequisites

  • Amazon Linux 2
  • sudo privileges

Install PowerShell on Amazon Linux 2

Step 1. Install dependencies.

yum install curl libunwind libicu libcurl openssl libuuid.x86_64 wget tar gzip

Step 2. Get the script.

wget https://raw.githubusercontent.com/PowerShell/PowerShell/master/docker/InstallTarballPackage.sh

Step 3. Add execute permissions.

chmod +x InstallTarballPackage.sh

Step 4. Install PowerShell.

sudo ./InstallTarballPackage.sh 7.2.7 powershell-7.2.7-linux-x64.tar.gz

Step 5. Verify the installation.

pwsh

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.