Installing Golang in Ubuntu

1 min read  •  18 Apr 2025
Views:

Here's how you can install Golang in Ubuntu-

  1. Download golang linux archive from here.

  2. Remove any previous Go installation (if any), and unzip downloaded archive into /usr/local directory.

rm -rf /usr/local/go && tar -C /usr/local -xzf go1.24.2.linux-amd64.tar.gz
  1. Add Golang path in your shell config by adding following line at the end of your .zshrc or .bashrc
export PATH=$PATH:/usr/local/go/bin
  1. Golang is successfully installed on your system, restart your terminal to try it!
golang-installed