.Net Core Installation

Step-by-Step Guide for .NET Core Runtime Installation

Step 1: Downloading .NET Core Runtime 8.0.4

  • First, download .NET Core Runtime 8.0.4 from here. Be mindful of version compatibility to avoid encountering error messages on the terminal screen.

Step 2: Transferring the Downloaded File to Raspberry Pi

  • Transfer the downloaded file to Raspberry Pi using a USB flash drive or file transfer programs like FileZilla. For information on file transfer via FTP, visit here.

Step 3: Moving the File to /home/raspberrypi/Downloads Directory

  • Move the downloaded file to the /home/raspberrypi/Downloads directory on Raspberry Pi.

Step 4: Opening Terminal and Creating ‘dotnet’ Folder

  • Open the terminal on Raspberry Pi and create a folder named ‘dotnet’ in the /home/raspberrypi/ directory:

bash

mkdir /home/raspberrypi/dotnet

Note: The directory “/home/raspberrypi” may vary depending on your username and device.)

Step 5: Extracting the Downloaded File to ‘dotnet’ Folder

  • Assuming the downloaded file is named dotnet-runtime-8.0.4-linux-arm.tar.gz, use the following command to extract it into the ‘dotnet’ folder:

bash

tar -xvf dotnet-runtime-8.0.4-linux-arm.tar.gz -C /home/raspberrypi/dotnet/

Step 6: Setting up the PATH

  • To set up the PATH for dotnet, edit the .bashrc file with the following command:

bash

sudo nano /home/raspberrypi/.bashrc
  • Add the following lines to the bottom of the file:

bash

export DOTNET_ROOT=/home/raspberrypi/dotnet/
export PATH=$PATH/home/raspberrypi/dotnet/
  • After editing, press Ctrl + X to exit, then Y and Enter to save the file.

Step 7: Applying Changes

  • To apply the PATH changes without restarting, run the following command:

bash

source ~/.bashrc

Step 8: Setting dotnet PATH as Default Secure Path

  • To set the dotnet PATH as a default secure path, edit the sudoers file with visudo using:

bash

sudo visudo
  • Paste the following line below the existing “Default secure path” line:

bash

Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/raspberrypi/dotnet"
  • Once done editing, save and close the file.