Sub navigation

Compile for Linux

When you compile for another platform than your own computer, tell Go which target platform Go should use. Here, “GOOS=linux”. This command you enter using the Terminal / Command Prompt as usual.

GOOS=linux go build

The compiled executable is created at the same level as "main.go". This executable is uploaded in the next step.