Skip to content

Instantly share code, notes, and snippets.

@mattiasghodsian
Last active May 31, 2025 14:42
Show Gist options
  • Save mattiasghodsian/7a19854f2882e216a6ec0d74bc4ff438 to your computer and use it in GitHub Desktop.
Save mattiasghodsian/7a19854f2882e216a6ec0d74bc4ff438 to your computer and use it in GitHub Desktop.
Install Go Lang on Ubuntu/Pop!_OS 20.04 LTS (zsh)

Install Go Lang on Ubuntu/Pop!_OS 20.04 LTS (zsh)

  • Get Go lang from golang.org
  • Extract the archive sudo tar -xvf go1.15.6.linux-amd64.tar.gz
  • Move the go directory to /usr/local directory sudo mv go /usr/local
  • Add global variable to your shell (zsh) nano ~/.zshrc
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
  • Update the shell source ~/.zshrc
@papadavis47
Copy link

I appreciate this gist πŸ‘ I am also a Pop_OS user and this is very helpful πŸ₯‡

@mattiasghodsian
Copy link
Author

I appreciate this gist πŸ‘ I am also a Pop_OS user and this is very helpful πŸ₯‡

You're Welcome

@eriko
Copy link

eriko commented Sep 4, 2024

sudo apt install golang

@mattiasghodsian
Copy link
Author

sudo apt install golang

Not all distros have it

@greglixandrao
Copy link

Thank you man! very helpful

@longnh462
Copy link

Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment