How To Install Go On Linux Mint 20.2
To Install Go On Linux Mint 20.2
Introduction:
Go was originally built for programs related to networking and infrastructure. It was intended to replace popular high-performance server-side languages like java and c++. Today, go is used for a variety of applications like cloud and server side applications, devops, command line tools and much more.
Step 1: Check the OS version by using the below command
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20.2
Release: 20.2
Codename: uma
Step 2: update the package by using the below command
root@linuxhelp:~# apt-get update
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.canonical.com/ubuntu focal InRelease
Ign:4 http://packages.linuxmint.com uma InRelease
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://packages.linuxmint.com uma Release [24.1 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,069 kB]
Get:9 http://packages.linuxmint.com uma Release.gpg [833 B]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [574 kB]
Get:11 http://packages.linuxmint.com uma/upstream amd64 Packages [49.9 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [345 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,400 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [283 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [197 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [277 kB]
Get:17 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [35.8 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.7 kB]
Get:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9,096 B]
Get:20 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [616 kB]
Get:21 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [566 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [88.1 kB]
Get:23 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [80.9 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [654 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [884 kB]
Get:26 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [668 kB]
Get:27 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [525 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [193 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [363 kB]
Get:30 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [112 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [19.9 kB]
Get:32 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [65.9 kB]
Get:33 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
Get:34 http://archive.ubuntu.com/ubuntu focal-backports/main i386 Packages [34.5 kB]
Get:35 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [13.0 kB]
Get:36 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [42.0 kB]
Get:37 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:38 http://archive.ubuntu.com/ubuntu focal-backports/main Translation-en [10.0 kB]
Get:39 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [7,992 B]
Get:40 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [864 B]
Get:41 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [18.9 kB]
Get:42 http://archive.ubuntu.com/ubuntu focal-backports/universe i386 Packages [10.5 kB]
Get:43 http://archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [7,492 B]
Get:44 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [11.3 kB]
Get:45 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [636 B]
Fetched 9,611 kB in 9s (1,036 kB/s)
Reading package lists... Done
Step 3: Download the golang package by using the below command
root@linuxhelp:~# wget -q https://storage.googleapis.com/golang/getgo/installer_linux
Step 4: Give the executable permission by using the below command
root@linuxhelp:~# chmod +x installer_linux
Step 5: Install the package by using the below command
root@linuxhelp:~# ./installer_linux
Welcome to the Go installer!
Downloading Go version go1.17.5 to /root/.go
This may take a bit of time...
Downloaded!
Setting up GOPATH
GOPATH has been set up!
One more thing! Run `source /root/.bash_profile` to persist the
new environment variables to your current session, or open a
new shell prompt.
Step 6: Add the go function file to the system shell scripts by using the below command
root@linuxhelp:~# source /root/.bash_profile
Step 7: check the Go version by using the below command
root@linuxhelp:~# go version
go version go1.17.5 linux/amd64
By this How to install Go on Linux Mint 20.2 has come to an End.
Comments ( 0 )
No comments available