Skip to content

Instantly share code, notes, and snippets.

@teebow1e
Last active June 13, 2025 07:23
Show Gist options
  • Select an option

  • Save teebow1e/d9fd46d474b9ae9e91b6101cea70047f to your computer and use it in GitHub Desktop.

Select an option

Save teebow1e/d9fd46d474b9ae9e91b6101cea70047f to your computer and use it in GitHub Desktop.
Install latest Golang
#!/bin/bash
GOLANG="$(curl -s https://go.dev/dl/ | grep -o 'go[0-9\.]*\.linux-amd64.tar.gz' | head -n 1)"
wget https://go.dev/dl/$GOLANG
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf $GOLANG
rm $GOLANG
unset GOLANG
echo -e 'export PATH=$PATH:/usr/local/go/bin' | tee -a ~/.bashrc
bash -c "go env"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment