Go (golang)
Install Go on Linux
Install
Check latest version on GoLang and change it if you want latest. Here, the Go version is 1.23.1.
You have to know CPU architecture, you can check it with this command:
sh
uname -mx86_64is AMDaarch64is ARMarm64is ARM
sh
x86_64 # In this case, it's AMDoutput
You can have another architecture, check it on GoLang website.
sh
wget -c https://golang.org/dl/go1.23.1.linux-amd64.tar.gz -O go.tar.gzsh
wget -c https://golang.org/dl/go1.23.1.linux-arm64.tar.gz -O go.tar.gzDelete old Go installation and extract new one.
sh
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go.tar.gzAdd to PATH
If you haven't ZSH, you can use ~/.bashrc instead of ~/.zshrc.
sh
vim ~/.zshrcsh
export PATH=$PATH:/usr/local/go/bin
export GOPATH="$HOME/go"
PATH="$GOPATH/bin:$PATH"sh
source ~/.zshrcNow you can delete Go archive.
sh
rm go.tar.gzVersion
You can check Go version with go version command.
sh
go versionUpdate
Download new version of Go.
sh
wget -c https://golang.org/dl/go1.23.1.linux-amd64.tar.gz -O go.tar.gzDelete old Go installation and extract new one.
sh
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go.tar.gz