How to Execute Linux Commands in Golang 2022-07-04 27 words - 1 min read If you want to execute linux commands in Golang, then you can use exec.Command: 1 2 3 cmd := exec.Command("echo", "hello world") res, _ := cmd.CombinedOutput() fmt.Println(string(res))