How to Check Golang Version in Linux

Hey! If you love Go and building Go apps as much as I do, let's connect on Twitter or LinkedIn. I talk about this stuff all the time!

Want to learn how to build better Go applications faster and easier? You can.

Check out my course on the Go Standard Library. You can check it out now for free.


Are you a Go developer wondering which version of Go is currently installed on your Linux system? Look no further! In this article, we’ll show you how to easily check the version of Go in just a few simple steps.

Go (also known as Golang) is an open-source programming language that is designed for building scalable and efficient applications. If you’re a Go developer working on a Linux system, you may need to check which version of Go is currently installed on your system. In this blog post, we’ll walk you through the steps to check the Go version in Linux.

Step 1: Open the Terminal

To get started, you’ll need to open the terminal on your Linux system. You can do this by pressing the Ctrl+Alt+T keyboard shortcut, or by searching for “Terminal” in your system’s applications menu.

Step 2: Check the Go Version

Once you have the terminal open, you can check the version of Go installed on your system by running the following command:

go version

This will display the current version of Go that is installed on your system. The output should look something like this:

“How to Check Golang Version in Linux”

In this example, the version of Go installed is go1.20.

If Go is not installed on your system, you’ll see an error message that says “command not found: go”. In that case, you’ll need to install Go before you can check its version.

Step 3: Verify the Go Installation Path

In some cases, you may have multiple versions of Go installed on your system. If you want to verify the installation path of Go, you can run the following command:

which go

This will display the installation path of the Go executable. The output should look something like this:

“How to Check Golang Version in Linux”

In this example, the Go executable is installed in the /usr/bin/ directory.

Conclusion

Checking the version of Go installed on your Linux system is a simple process that can be done using the go version command. If you need to install Go on your system, you can download the latest version from the official Go website.


Questions or comments? Reach out to me


Learn how to leverage the Go Standard Library like a PRO.

I just created a new course, The Go Standard Library, check it out!