Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Last active May 28, 2025 10:38
Show Gist options
  • Save zoonderkins/8c0c7eba6d7b12d5da6a8bdeec1da9b2 to your computer and use it in GitHub Desktop.
Save zoonderkins/8c0c7eba6d7b12d5da6a8bdeec1da9b2 to your computer and use it in GitHub Desktop.
Install Golang on Debian / Raspberry Pi #linux

Last update at 2025-05-28

Install Golang on Debian / Raspberry Pi

rm -rf /usr/local/go
GOVERSION="1.24.3"
wget "https://golang.org/dl/go${GOVERSION}.linux-amd64.tar.gz" -4
tar -C /usr/local -xvf "go${GOVERSION}.linux-amd64.tar.gz"
rm "go${GOVERSION}.linux-amd64.tar.gz"

For Bash

cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF

source ~/.bashrc

For ZSH

cat >> ~/.zshrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF

source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment