Installation

// archive From the original Code Walker docs. Kept for reference, so some versions and commands may be out of date.

Check the current releases https://go.dev/dl/

Download a version for Linux:

wget https://go.dev/dl/go1.22.4.linux-amd64.tar.gz

Extract the archive:

sudo tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz

Include the export in you PATH environment variable:

export PATH=$PATH:/usr/local/go/bin

You can make this persistent by adding it to your .bash_profile:

~/.bash_profilebash
export PATH=$PATH:/usr/local/go/bin

This will load when you log into you system, however you can always use source to reload the exports:

source ~/.bash_profile

You can validate the install version of go:

go version
tip

If you already have a version installed, you can perform the following command to remove and extract a different version

rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz

Reference: https://go.dev/doc/install