Install dotnet SDK on Raspberry Pi with dotnet-install.sh script
Published: January 10, 2026
The Raspberry Pi is a fantastic platform for learning, experimenting, and building lightweight applications. With .NET now supporting ARM architectures, you can run .NET applications directly on your Raspberry Pi. Whether you’re building IoT projects, web services, or console applications, getting .NET installed on Raspberry Pi OS is straightforward using Microsoft’s official installation script.
This guide assumes you’re running Raspberry Pi OS (the default operating system for Raspberry Pi). The installation uses a simple bash script that handles downloading and configuring .NET for your system.
Installation Steps
The installation process involves running a script that downloads and installs .NET, then configuring your shell environment so the dotnet command is available system-wide.
Download and install .NET 10.0:
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 10.0
This command downloads the official .NET installation script from Microsoft and pipes it directly to bash. The --channel 10.0 parameter specifies that you want .NET 10.0, the latest long-term support (LTS) version at the time of writing. The script handles downloading the correct ARM binaries for your Raspberry Pi and installs them to ~/.dotnet in your home directory.
The -sSL flags tell curl to run silently (-s), show errors if they occur (-S), and follow redirects (-L). This ensures the download works smoothly without cluttering your terminal with progress information.
Configuring Your Environment
After the installation completes, you need to configure your shell environment so it knows where to find the .NET tools. This involves setting two environment variables: DOTNET_ROOT and updating your PATH.
Set the DOTNET_ROOT environment variable:
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
The DOTNET_ROOT variable tells .NET where its installation directory is located. This is important for the runtime to find necessary libraries and configuration files.
Add .NET to your PATH:
echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc
Adding ~/.dotnet to your PATH allows you to run dotnet commands from any directory in your terminal. Without this, you’d need to type the full path to the dotnet executable every time.
Both commands append the export statements to your ~/.bashrc file, which is the configuration file that runs every time you start a new bash session.
Apply the changes to your current session:
source ~/.bashrc
The source command reloads your .bashrc file, applying the changes immediately to your current terminal session. Without this, you’d need to close and reopen your terminal for the changes to take effect.
Verify the Installation
Once the environment is configured, verify that .NET is installed correctly and accessible:
dotnet --info
This command displays detailed information about your .NET installation, including the installed SDK version, runtime version, and system information. If everything is configured correctly, you should see output showing .NET 10.0 and information about your Raspberry Pi’s ARM architecture.
If the command isn’t recognized, double-check that you ran the source ~/.bashrc command, or try closing and reopening your terminal.
Reboot for Clean Slate
After completing the installation and verification, it’s a good idea to reboot your Raspberry Pi to ensure all changes are fully applied and the system is in a clean state:
sudo reboot
After the reboot, open a terminal and run dotnet --info again to confirm everything is still working. The dotnet command should now be available in all new terminal sessions without any additional configuration.
Why Use the Script Method?
As of this writing, Microsoft does not have a package repo with a compatible dotnet sdk image available for installation via something like “apt install…”. They recommend using the script for Raspberry Pi.
Ready to Build
With .NET installed on your Raspberry Pi, you’re ready to start building applications. You can create console applications, web APIs with ASP.NET Core, or even IoT applications using .NET’s GPIO libraries.
Try creating a simple “Hello, World” app to test your setup:
dotnet new console -n HelloPi
cd HelloPi
dotnet run
You should see “Hello, World!” printed to your terminal — confirmation that your .NET environment is fully operational.
For more information on the .NET installation script and available options, check out the official documentation: Install .NET on Linux
Build something awesome!