Install Latest Version of Go (Linux/OSX)

This article describes how to install the latest version of Go (golang). It also helpfully updates itself by pulling the latest version numbers directly, so you don’t have to go and dig out the latest version each time they release a version (yay!) - just copy and paste away. For more info, try their installer docs.

Ubuntu/Linux

Step 1) Download

$
Copy to Clipboard
wget https://dl.google.com/go/go1.24.4.linux-amd64.tar.gz

Step 2) Extract & Install

$
Copy to Clipboard
sudo tar -C /usr/local -xvf go1.24.4.linux-amd64.tar.gz

Step 3) Add Path to file (if you are installing for the first time)

$
Copy to Clipboard
echo "export PATH=\$PATH:/usr/local/go/bin" >> $HOME/.profile
$
Copy to Clipboard
source ~/.profile

Step 4) Test

$
Copy to Clipboard
go version

If you’re trying to update your go version instead of installing it, you can clear your existing version by calling: sudo rm -rvf /usr/local/go/.

OSX

Download the latest installer at:

$
Copy to Clipboard
https://go.dev/dl/go1.24.4.darwin-amd64.pkg
Download Package

 

Easy! (hopefully) Let us know in comments below if you hit any issues.