Go is used by many large companies and has become one of the most popular programming languages in the world because of its popularity among cloud application developers.
Some of the most notable applications written in Go include Kubernetes, the container orchestration system that powers many popular cloud platforms; Docker, the containerization platform that makes it easy to deploy and manage applications; and Terraform, the infrastructure as code tool that helps developers build and manage cloud infrastructure.
In this direct-to-point tutorial, we will guide you through the process of downloading and installing the latest version of Go on Ubuntu.
Kubernetes Application Developer
Cloud Application Developer
Google Cloud Developer
Install Go from the standard repository
Fire up your terminal, and the following commands will guide you through the installation process, which is incredibly straightforward.
First off, let's make sure that the package lists are up to date. This will also ensure that you are installing the latest version of Go available in the repository.
To install Go from the standard repository, run the following command.
You will then be prompted with "Do you want to continue?" [Y/n]. Once the download and installation is complete, you can check the version of Go by using the following command.
After the installation is complete, you can also run the following command to upgrade any other packages on your system to their latest versions. This step is optional and depends on your preference.
This is the most straightforward method to install Go on Ubuntu and is preferred by developers, as it is similar to installing any other package from the standard repository.
Install Go on Ubuntu with wget
Wget is more powerful and flexible than downloading through the browser. For example, Wget can download files from any website, regardless of the protocol, and it can download files in parallel to improve download speeds.
The following command uses the wget method to download the latest version of the Go binary for Linux:
This command will download the Go binary tarball to the current directory. However, you should take note of the link. It is a specific version, and you can always get the latest file link from go.dev/dl.
Once the download is complete, you can extract the tarball using the following command:
Add the Go binaries directory to your PATH environment variable:
To reload the PATH environment variable, source your bashrc file.
Verify that Go is installed correctly by running the following command:
You should see the version of Go that you installed.
This also is the most reliable way to install Go on Ubuntu or any Linux distro. If, however, you encounter any errors during the installation process, please refer to the Go documentation for troubleshooting steps.
Thanks for making it to the end.
If you're a die hard Linux fan, we've got just the thing for you. Check out tis resource on lightweight Linux distros that are perfect for older hardware or systems with limited resources. It's totally worth a read!
Contextual Stacks improving
- Banner Image Credits go.dev / Wikipedia