This guide will walk you through the installation of Go (Golang) on Fedora 33/32/31/30. Go is a programming language designed to ease the Development of reliable, simple, and efficient applications. It is an original product of Google Engineering.

install latest golang centos7 ubuntu 18.04 01

In this guide, we will install Go on Fedora 33/32/31/30 from official upstream repositories. To ensure the repositories are up-to-date, update the system.

sudo dnf -y update

Once you confirm it is up, install Go on Fedora 33/32/31/30 using the commands below.

sudo dnf -y install go

Test Go installation on Fedora 33/32/31/30

Now that we have Go installed on Fedora, let’s test to ensure it is working.

Start by creating your workspace directory.

mkdir $HOME/go

Create a directory inside it to host a test Go application.

cd $HOME/go
mkdir -p src/helloworld && cd src/helloworld

Create a file named helloworld.go that looks like:

package main
import "fmt"
func main() {
	fmt.Printf("hello, world\n")
}

Build the application with go tool:

cd $HOME/go/src/helloworld
go build

This will generate a new file called helloworld .

$ ls
helloworld helloworld.go

Execute the file by running.

$ ./helloworld 
hello, world

To install the binary into your workspace’s bin directory, use:

$ go install
$ ls ~/go/bin/
helloworld

To remove it use:

go clean -i

You can add your Go binary directory to $PATH.

$ vim ~/.bashrc 
export PATH="$PATH:~/go/bin/"
export GOPATH="~/go"

You have installed Go on Fedora 33/32/31/30. Enjoy developing Go applications on your Fedora Workstation.

Best Go Programming Books for Beginners and Experts

Go learning courses:

Similar:

Install and Configure DBeaver on Fedora

How To Install Podman on Fedora

How To Install Polybar Status bar on Fedora

How To Install Kodi Media Server on Fedora

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here