Go Installation On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora, Raspbian And MacOS
Install go
-
Debian
apt-get install golang-bin
Click to copy -
Ubuntu
apt-get install golang-bin
Click to copy -
Alpine OS
apk add go
Click to copy -
Arch Linux
pacman -S go
Click to copy -
Kali Linux
apt-get install golang-bin
Click to copy -
Fedora
dnf install golang-bin
Click to copy -
Raspbian
apt-get install golang-bin
Click to copy -
macOS
brew install go
Click to copy
Tool for managing go source code.
How to use go?
Below are few example commands for go that you can use in the terminal.
Download and install a package, specified by its import path:go get package_path
Click to copyCompile and run a source file (it has to contain a `main` package):go run file.go
Click to copyCompile a source file into a named executable:go build -o executable file.go
Click to copyCompile the package present in the current directory:go build
Click to copyExecute all test cases of the current package (files have to end with `_test.go`):go test
Click to copyCompile and install the current package:go install
Click to copy
Install the latest version of go in Debian, Ubuntu, Alpine, Arch, Kali, Fedora, Raspbian and macOS from terminal. To install the go just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of go from the respository and install it in your computer/server.