Next, extract the downloaded archive and install it to the desired location on the system. It’s considered best practice to keep it under /usr/local:

sudo tar -xvf go1.12.1.linux-amd64.tar.gz -C /usr/local
Use curl to retrieve the tarball URL that you copied from the official Go downloads page:

curl -LO https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz
The hash that is displayed from running the above command should match the hash that was on the downloads page. If it does not, then this is not a valid file and you should download the file again.

Output2a3fdabf665496a0db5f41ec6af7a9b15a49fbe71a85a50ca38b1f13a103aeec  go1.12.1.linux-amd64.tar.gz
Next, use sha256sum to verify the tarball:

sha256sum go1.12.1.linux-amd64.tar.gz
Before downloading Go, make sure that you are in the home (~) directory:

cd ~
You should see output similar to this:

Outputdrwxr-xr-x 4 root root  4096 Apr  5 00:43 ./
drwxr-xr-x 3 root root  4096 Apr  5 00:43 ../
drwxr-xr-x 8 root root  4096 Apr  5 00:43 .git/
-rwxr-xr-x 1 root root     8 Apr  5 00:43 .gitignore*
-rw-r--r-- 1 root root    61 Apr  5 00:43 .travis.yml
-rw-r--r-- 1 root root  2808 Apr  5 00:43 CHANGELOG.md
-rw-r--r-- 1 root root  1851 Apr  5 00:43 CONTRIBUTING.md
.
.
.
-rw-r--r-- 1 root root  4893 Apr  5 00:43 vpcs.go
-rw-r--r-- 1 root root  4091 Apr  5 00:43 vpcs_test.go
And we should receive output like this:

Outputgo version go1.12.1 linux/amd64

Recommend

How To Install Go and Set Up a Local Programming Environment on Ubuntu 18.04 Step 1 — Setting Up Go

How To Install the Apache Web Server on Ubuntu 16.04 Step 4: Manage the Apache Process

How To Install the Apache Web Server on Ubuntu 16.04 Step 3: Check your Web Server

How To Install the Apache Web Server on Ubuntu 16.04 Step 2: Adjust the Firewall

How To Install the Apache Web Server on Ubuntu 16.04 Step 1: Install Apache

Initial Server Setup with Debian 10 Step 5 — Enabling External Access for Your Regular User If the Root Account Uses SSH Key Authentication

Initial Server Setup with Debian 10 Step 5 — Enabling External Access for Your Regular User If the Root Account Uses Password Authentication

Initial Server Setup with Debian 10 Step 4 — Setting Up a Basic Firewall

Initial Server Setup with Debian 10 Step 3 — Granting Administrative Privileges

Initial Server Setup with Debian 10 Step 2 — Creating a New User

Initial Server Setup with Debian 10 Step 1 — Logging in as Root

How To Install Nginx on Ubuntu 18.04 Conclusion Want to learn more? Join the DigitalOcean Community! Still looking for an answer?

How To Install Nginx on Ubuntu 18.04 Step 5 – Setting Up Server Blocks (Recommended)

How To Install Nginx on Ubuntu 18.04 Step 4 – Managing the Nginx Process

How To Install Nginx on Ubuntu 18.04 Step 3 – Checking your Web Server

How To Install Nginx on Ubuntu 18.04 Step 2 – Adjusting the Firewall

How To Install Nginx on Ubuntu 18.04 Step 1 – Installing Nginx

Understanding the DOM Tree and Nodes Modifying the DOM with Events

Understanding the DOM Tree and Nodes Identifying Node Type

Understanding the DOM Tree and Nodes The DOM Tree and Nodes

Understanding the DOM Tree and Nodes HTML Terminology

Установка Nginx в Ubuntu 20.04 Шаг 5 — Настройка блоков сервера (рекомендуется)

Установка Nginx в Ubuntu 20.04 Шаг 4 — Управление процессом Nginx