How to Build and Run a Go ( golang ) Program in Linux Operating System

Published: 17 January 2021
on channel: LearningLad
11,517
129

In this tutorial you will learn how to compile / build and run a go ( golang ) program in Linux operating system.

Here i'm using Manjaro Linux but the process will be same for all Linux distro.

How to install go language in Manjaro Linux using pacman
   • How to Install Go Language golang in ...  

First we use a simple text editor and write the program.
After that we build the program and generate the executable file using
go build filename.go

to run the executable file use the command
./filename

to give a custom name for the executable file use
go build -o customname filename.go

to run the go program without generating the executable file use the command
go run filename.go

Our Website
https://www.LearningLad.com

Social Media
Facebook   / learninglad  
Twitter   / learningladedu  
Instagram   / learningladofficial  


Watch video How to Build and Run a Go ( golang ) Program in Linux Operating System online without registration, duration hours minute second in high quality. This video was added by user LearningLad 17 January 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 11,517 once and liked it 129 people.