.net, aws, amazon linux 2,

Install .NET on Amazon Linux 2

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

Building your .NET project on Amazon Linux can cause issues regarding the packages and dependencies. Today I’m going to show you how to install the .NET package on Amazon Linux 2.

Prerequisites

  • Amazon Linux 2
  • sudo privileges

Install .NET on Amazon Linux 2

Step 1. Update the system packages.

sudo yum update

Step 2. Add the Microsoft packages.

rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm

Step 3. Install .NET:

sudo yum install dotnet-sdk-6.0

Step 4. Verify the installation.

dotnet --list-sdks

Output:

6.0.401 [/usr/share/dotnet/sdk]

Conclusion

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