We continue with the tutorials dedicated to .NET by seeing how to install .NET easily on a Raspberry Pi 2 or higher, or Zero 2 W.
In the previous post we saw how to install .NET on a computer with Ubuntu. This time we are going to see how to install it on a Raspberry Pi, taking advantage of .NET’s ability to run on different architectures.
.NET is available on ARM-7 or higher architectures. This means it is available on Raspberry Pi 2, 3, 4 and Zero 2 W. However, it will not work on Raspberry Pi 1 and Zero W.
In the case of Raspberry Pi, it won’t be as simple as on Ubuntu, since .NET is not available in the platform’s package managers. To install it, the easiest way is to run the dotnet-install script, which we can do with the following command:
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin —channel STS
Where --channel indicates the version number we want to install. We can use:
- STS: latest Standard Term Support release
- LTS: latest Long Term Support release
- A.B: Version A.B (for example 6.0)
Next, it’s a good idea to add the .NET path to the PATH environment variable so we can use it from any folder. To do this, we simply do:
echo ‘export DOTNET_ROOT=
Once .NET is installed, we check that it has been installed correctly by running this command, as we saw in the previous post.
dotnet —version
This should show the version of .NET we have installed. We can also list the SDKs and runtimes we have installed on the system with these two commands:
#list sdks dotnet —list-sdks
#list runtime dotnet —list-runtimes
According to Microsoft, this installation method via the script is only recommended for server installations. However, it is the best way I have found to install it easily on the Raspberry Pi. If I ever find a better way, I will update the post.

