How do I install the Go language in the Ubuntu system?

You can install the Go programming language on Ubuntu system by following these steps:

  1. Open the terminal and use the following command to download the Go language installation package:
  2. Download the go1.17.linux-amd64.tar.gz file from https://golang.org/dl.
  3. Unzip the installation package.
  4. Extract the contents of the file go1.17.linux-amd64.tar.gz.
  5. Move the extracted folder to the /usr/local directory.
  6. Move the “go” file to the directory “/usr/local” using elevated privileges.
  7. Set up environment variables by editing the ~/.profile file.
  8. Open the .profile file in the nano text editor.
  9. Add the following content to the end of the document and save it:
  10. Set the PATH variable to include /usr/local/go/bin and set the GOPATH variable to $HOME/go.
  11. Update the environment variables.
  12. Execute the .profile file
  13. To verify that Go language has been successfully installed, run the following command:
  14. What is the version of Go you are currently using?
  15. If installed successfully, it will display information about the version of Go language.

You have now successfully installed the Go language on your Ubuntu system.

bannerAds