root@ubuntu:~# apt install golang-go
root@ubuntu:~# sudo vim /etc/profile
export PATH=$PATH:/usr/local/go/bin
root@ubuntu:~# source /etc/profile
root@ubuntu:~# go version
go version go1.10.4 linux/amd64
root@ubuntu:~# vim hello.go
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
root@ubuntu:~# go build hello.go
root@ubuntu:~# ./hello
hello, world
root@ubuntu:~# go run hello.go
hello, world