Go on Ubuntu

Mar 21, 2014
[Go](http://golang.org) also know as [golang](http://golang.org), is a programming language developed at [Google](https://google.com/). It is a statically-typed language with syntax loosely derived from that of C, Go feature an automatic memory management and type safety. You can learn more about Go from [Wikipedia]([http://en.wikipedia.org/wiki/Go_(programming_language)](http://en.wikipedia.org/wiki/Go_(programming_language)).

We will be installing Go using Gophers PPA. This PPA will install the latest stable version of Go available for Ubuntu.

Installing

Adding the PPA.

“` sudo add-apt-repository ppa:gophers/go “`
Updating local repository database.
“` sudo apt-get update “`
Installing **Go**.
“` sudo apt-get install glang-stable “`
#### Wrting you first Go program.
  • Create a file named ‘app.go’. Go uses .go as extension to identify a Go language file.
  • Use you favorite editor to open the file ‘app.go’.
  • Add the lines given below to the file.
`packagemainimport“fmt”funcmain(){fmt.Println(“Hello, World!”)}`
Save the changes you have made in the file.

Now execute the programming by entering the command below.

“` go run app.go “`
We now have Go language complier installed on Ubuntu. If you have any problem feel free to leave a comment below.

If you like this content, please consider buying me a coffee.

Buy me a coffeeBuy me a coffee

You will get access to contributer exclusive resources and content.

Thank you!



Darryl Dias

I am a student, artist, and author currently living in Florida. My interests range from technology to arts. I am also interested in programming, writing

Analytics by GoSquared