This blog post will show you how to add .NET to your Linux PATH and set the OS to use the correct version.

Check .NET SDK Path

To check and find your .NET 6 install run the following command.

dotnet --list-sdks

The output of the command will show you the path as shown below.

6.0.106 [/usr/lib64/dotnet/sdk]

Add to Path

To add the above path to the PATH, I will add the following line to my ~/.bash_profile

export PATH="/usr/lib64/dotnet/sdk:$PATH"

After saving the file, reload the shell using the command below.

source ~/.bash_profile

Processing…
Success! You're on the list.

Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.