Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find go version [duplicate]

Tags:

go

Why can't I find the version of go on my ubuntu 14.04? The output of go version doesn't give me info on whether the go is 1.7 or 1.8. Any ideas?

$ go version
go version xgcc (Ubuntu 4.9.3-0ubuntu4) 4.9.3 linux/amd64
$ uname -a
Linux jin1-hp1 3.19.0-65-generic #73~14.04.1-Ubuntu SMP Wed Jun 29 21:05:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Following another post, I found it from the command of docker, but I would like to find the version from go command itself.

$ docker version
Client:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:47:50 2016
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
like image 846
packetie Avatar asked May 07 '17 03:05

packetie


People also ask

How do I find my go version?

So you can see in this case that the version of Go that I have installed on my Windows PC is go15. 2 windows/amd64. So if you ever need to check the version of Go that you have installed on your PC, you can do it through the command prompt by typing in the single line, go version, and this will return the result.

How do I get multiple versions of GO?

How to Work With Multiple Go Versions. We can use the go install command to download install individual versions of Go. Running go install golang.org/dl/go<version>@latest will download and install a wrapper Go command for the specific Go version.

How can I get binary version?

For existing binaries, use the go version command: usage: go version [-m] [-v] [file ...] Version prints the build information for Go executables. Go version reports the Go version used to build each of the named executable files.

What is the latest version of GO?

Introduction to Go 1.18 The latest Go release, version 1.18, is a significant release, including changes to the language, implementation of the toolchain, runtime, and libraries. Go 1.18 arrives seven months after Go 1.17.


1 Answers

Perhaps write a small program to print runtime.Version() ?

like image 173
captncraig Avatar answered Sep 22 '22 04:09

captncraig