Skip to content

Instantly share code, notes, and snippets.

@kentlouisetonino
Last active December 21, 2023 01:52
Show Gist options
  • Save kentlouisetonino/64bbdaaf39b9416c010a1bc933547458 to your computer and use it in GitHub Desktop.
Save kentlouisetonino/64bbdaaf39b9416c010a1bc933547458 to your computer and use it in GitHub Desktop.
Description

Steps

  • Delete the go first in your machine.
# sudo: Allows superuser privileges to execute the command.
# rm: Remove.
# -r: Recursively removes files and directories.
# -f: Forces the removal of files and directories.
sudo rm -rf /usr/local/go
  • Download the latest version and rename to go.gz.
https://go.dev/dl/
  • Go to the download directory and run the command below.
# sudo: Allows superuser privileges to execute the command.
# tar (Tape Archive): A tool for managing and manipulating archive files.
# -C: Means change to target directory which is the /usr/local.
# -x: Extract files from an  archive.
# -z: This option is used to filter the archive through gzip.
# -f: This option is used to specify the filename of the archive followed by the file which is "go.gz".
sudo tar -C /usr/local -xzf go.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment