Home >Backend Development >Golang >How to install Go language in Deepin system
Deepin is a Linux operating system dedicated to providing users with a good desktop experience. As a programming language that has attracted much attention in recent years, the installation process of Go language on the Deepin system is relatively simple. Below, this article will introduce in detail how to install the Go language in the Deepin system.
1. Installation preparations
Before starting the installation, you need to prepare the following links:
Enter the following command in the terminal to check whether the current system is the latest version:
$ sudo apt update && sudo apt upgrade
Enter the following command in the terminal to install the necessary software packages:
$ sudo apt install build-essential
Go to the official website (golang.org) to download the corresponding version of the Go language installation package, and unzip the downloaded package to the specified directory.
2. Configure environment variables
After installing the Go language, we also need to configure environment variables to access Go in the terminal.
$ sudo vim ~/.bashrc
Add the following configuration at the end of the file:
export GOPATH=$HOME/go
export PATH=$PATH :/usr/local/go/bin:$GOPATH/bin
$ source ~/.bashrc
3. Check whether the installation is successful
Enter the following command in the terminal:
$ go version
If the running result is as follows, it means that the Go language has been successfully installed:
go version go1.12.1 linux/amd64
4. Install the go tool
Install : go tool
go tool is the official command line tool of Go language. It provides some useful tool instructions to enhance interaction with Go language. Enter the following command in the terminal to install:
$ sudo apt install golang-go.tools
5. Install go full documentation
Install: Go Full Documentation
Installing the official and complete go documentation is very simple. Just enter the following command in the terminal:
$ sudo apt install golang-go.doc
After installing the official complete go document, you can open the local document through the browser, for example:
$ firefox /usr/share/doc/golang-go.doc/html/index.html
Through the above steps, we have successfully installed the Go language in the Deepin system and can start us happily A journey into Go programming.
The above is the detailed content of How to install Go language in Deepin system. For more information, please follow other related articles on the PHP Chinese website!