Getting started with Linux-installing Go in Linux

Source: Internet
Author: User
Tags install go linux mint

Getting started with Linux-installing Go in Linux

Go (also called "golang") is a programming language originally developed by Google. Since its birth, it has several design principles: simplicity, security, and speed. The Go language release has a variety of debugging, testing, tuning, and code review tools. Nowadays, the Go Language and Its tool chain are available in the basic repositories of most Linux distributions, and can be installed using the default Package Manager.

Install Go on Ubuntu, Debian, or Linux Mint

The following describes how to use apt-get to install the Go language and its development tools on the Debian-based release.

  1. $ Sudo apt-get install golang

Check the Go language version to verify the installation.

  1. $ Go version
go version go1.2.1 linux/amd64

Depending on your needs, you may want to use apt-get to install additional Go tools.

  1. $ Sudo apt-cache search golang

Install Go in Fedora, CentOS/RHEL

The following command installs the Go Language and Its tool in the Red Hat-based release.

  1. $ Sudo yum install golang

Check the Go language version to verify the installation.

  1. $ Go version
go version go1.3.3 linux/amd64

Depending on your needs, you may want to use yum to install additional Go tools.

  1. $ Yum search golang

Install Go language from official website

Sometimes the go language version in the release version is not the latest. To avoid this problem, you can install the latest Go language on the official website. The following are the steps.

Go to the official Go source code and download the pre-compiled binary code.

For 64-bit Linux:

  1. $ Wget https://storage.googleapis.com/golang/go1.4.1.linux-amd64.tar.gz

For 32-bit Linux:

  1. $ Wget https://storage.googleapis.com/golang/go1.4.1.linux-386.tar.gz

Install the program in/usr/local

  1. $ Sudo tar-xzf go1.4.1.linux-xxx.tar.gz-C/usr/local

Add the PATH environment variable of the system range to/etc/profile.

  1. $ Sudo vi/etc/profile
export PATH=$PATH:/usr/local/go/bin

If you have installed Go in a custom location other than/usr/local, you also need to set the GOROOT environment variable to point to the custom installation location.

  1. $ Sudo vi/etc/profile
export GOROOT=/path/to/custom/location

Check the Go language version

  1. $ Go version
go version go1.4.1 linux/amd64

Install Go Language Pack in Ubuntu

Go language programming (HD) full-version ebook

Go language and beauty-surpassing "Hello World"

Why do I like the Go language?

Implementation of the Go language memory distributor

Go language international support (based on gettext-go)

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.