> For the complete documentation index, see [llms.txt](https://til.cazzulino.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.cazzulino.com/dotnet/installing-.net-5.0-on-raspberry-pi-4.md).

# Installing .NET 5.0 on Raspberry Pi 4

None of the official methods worked for me (not even [involving horrid fixes](https://github.com/dotnet/core/issues/4446#issuecomment-843162084) ;)). So I ended up going the super manual route (mostly copying <https://elbruno.com/2019/08/27/raspberrypi-how-to-install-dotnetcore-in-a-raspberrypi4-and-test-with-helloworld-of-course/> and <https://elbruno.com/2020/01/05/raspberrypi-how-to-solve-dotnet-core-not-recognized-after-reboot/>).

```
$ sudo apt-get install lshw
$ sudo lshw
    description: Computer
    product: Raspberry Pi 4 Model B Rev 1.4
    serial: 10000000d5e618a2
    width: 64 bits

; OK, it's 64bits
; Get Arm64 download URL from https://dotnet.microsoft.com/download/dotnet/5.0

$ mkdir temp && cd temp
$ curl [URL] --output [FILENAME]
$ mkdir $HOME/dotnet
$ sudo tar zxf [FILENAME] -C $HOME/dotnet/
$ sudo ln -s $HOME/dotnet/dotnet /usr/local/bin
$ dotnet --version
5.0.203 
; or whatever version you downloaded

; Now we need to add it to PATH. Add the exports
$ sudo nano ~/.bashrc

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

; then Ctrl+X to save and exit. finally, load the new exports
$ source ~/.bashrc
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://til.cazzulino.com/dotnet/installing-.net-5.0-on-raspberry-pi-4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
