Side Nav

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 executeable is created at the same level as "main.go". This executeable is uploaded in the next step.