How to Install Go (Golang) on Linux: Step-by-Step Guide
HardReset.InfoJanuary 12, 20266 min67 views
2 connectionsΒ·4 entities in this videoβDownloading and Extracting Go
- π‘ Go (Golang) is a programming language that will be installed on the Linux system.
- π The official Linux tar.gz archive is downloaded from go.dev.
- π The downloaded archive is extracted to the
/usr/localdirectory using thesudo tar -xzfcommand.
Configuring Go Environment Variables
- π οΈ The
~/.bashrcfile is edited to configure the Go environment. - π The
PATHis updated to include/usr/local/go/bin. - π¦ The
GOPATHis set to~/goand itsbindirectory is also added to thePATH. - π The shell configuration is reloaded using
source ~/.bashrc.
Verifying the Installation
- β
The Go installation is verified by checking the version with
go version, which should displayGo 1.22.5.
Running a Simple Go Program
- π A workspace directory is created, and a
main.gofile is written with a basic "hello world" program. - π» The program is executed using
go run main.go, and the output "hello world" confirms the successful installation.
Knowledge graph4 entities Β· 2 connections
How they connect
An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.
Hover Β· drag to explore
4 entities
Chapters2 moments
Key Moments
Transcript22 segments
Full Transcript
Topics11 themes
Whatβs Discussed
Go (Golang)LinuxInstall GoGolang InstallationGo PATHBashrcTerminal CommandsProgramming LanguageHello World Programtar.gzUser Local Directory
Smart Objects4 Β· 2 links
ConceptsΒ· 4