Go is a programming language created by Google. It is becoming a very popular programming language for students and users trying to break into the dev world.
This post shows you how to install it in Ubuntu.
This brief tutorial shows students and new users how to install Go programming language on Ubuntu 20.04 | 18.04.
For those who don’t know, Go, also known as Golang is a cross-platform programming language developed by Google which makes it easy to build simple and reliable software.
Go is used to build some of the popular software and apps in use today, like Kubernetes, Docker, Grafana and few others. It comes with support for Linux distributions, macOS, Windows, and more.
For students and new users looking for a Linux system to start learning on, the easiest place to start is Ubuntu Linux OS…. It’s a great Linux operating system for beginners and folks looking for easier Linux distribution to use.
Ubuntu is an open source Linux operating systems that runs on desktops, laptops, server and other devices…
When using Ubuntu, you will find that Linux isn’t so different than Windows and other operating systems in so many ways, especially when it comes to using the system to get work done.…
Both Ubuntu and Windows systems allow you to be productive, easy to use, reliable and enable you to install and run thousands of programs from gaming to productivity suite software for individuals and businesses.
To get started with installing Go on Ubuntu, please follow the steps below:
How to download Go on Ubuntu Linux
For other systems, the process is usually straightforward. On Ubuntu and other Linux systems, you must download its binary package and install it.
At the time of this writing, the latest version is 1.13. But before downloading, visit the official Go downloads page and check if there is a new version available.
To download Go binary, run the commands below:
cd /tmp wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
After that run the commands below to extract the tarball file into the /usr/local directory.
sudo tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
That should extract Go binary and saved in the /usr/local directory.
How to configure Go on Ubuntu Linux
At this point, Go should be ready to use. however, in order to locate or find the Go executable binaries, you will need to configure your system and define an environment variable for Go.
You can define Go environment variable by adding the line below into the /etc/profile file (for a system-wide usage) or into your $HOME/.profile file just for you.
To make Go executable for your account only, add the line into your $HOME/.profile file by running the commands below to open it.
Then copy and paste the line below into the file and save.
Save the file and exit
When you’re done, run the commands below to complete the setup
To verify if Go is installed, run the commands belowt:
You should see similar output as shown below:
Output: go version go1.13 linux/amd64
This is how one installs and configures Go on Ubuntu 18.04 | 16.04
Your first program
To learn how to create your first Go program, please visit the like below:
You may also like the post below: