.NET on Raspberry Pi lets us run C# applications on Linux and ARM architecture.
This lets us use a Raspberry Pi as a small server, an IoT device, or a test machine for .NET applications, taking advantage of modern .NET’s ability to run on different architectures.
.NET is available for modern ARM architectures. In practice, it works on Raspberry Pi 2 or higher and Zero 2 W, but not on Raspberry Pi 1 or 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 LTS
Where --channel indicates the version number we want to install. We can use:
- LTS: most recent Long Term Support version
- STS: most recent Standard Term Support version
- A.B: specific version (for example, 10.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:
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
Microsoft recommends the dotnet-install script mainly for automation, CI, or controlled installations. On Raspberry Pi it is still a practical way to install a specific .NET version when we do not have it available directly from the repositories.

