Installing .NET Core SDK 3.1 on the Raspberry Pi

Jeff Davis
2 min readJun 30, 2020

--

Photo by Scott Webb on Unsplash

The official Microsoft documentation on installing dotnet for debian (Raspberry Pi OS) was not working for me. Here are the steps which I pieced together to get it installed.

First, switch to your Downloads directory and download the dotnet sdk for Linux Arm32 (assuming you’re running the 32-bit version of Raspberry Pi OS) from Microsoft. You can change this to the 64-bit version when that version of the OS is released. Just replace the file name in the commands below with the version you are using.

cd Downloads
wget https://download.visualstudio.microsoft.com/download/pr/dbf4ea18-70bf-4b0f-ae9c-65c8c88bcadd/115e84fb95170ddeeaf9bdb9222c964d/dotnet-sdk-3.1.301-linux-arm.tar.gz

Once finished, while still in the Downloads directory we need to make a directory to install to and then unpack it into that directory.

sudo mkdir -p $HOME/dotnet
sudo tar zxf dotnet-sdk-3.1.301-linux-arm.tar.gz -C $HOME/dotnet

This step may take a couple minutes to unpack everything. When you are back at a prompt, using your editor of choice edit the .bashrc file in your HOME directory to point PATH to the new install. Put the following two lines at the end of this file.

export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet

After saving this, load up the new path by running this command:

source ~/.bashrc

You can verify everything is installed by typing:

dotnet --version

Everything should be set up now. Happy developing!

--

--