I am trying to find out if a program exists on Linux and I found this article. I tried executing this from my go program and it keeps giving me an error saying it can-not fi
Just like that article says, "command" is a shell built-in. You can do this natively in go via exec.LookPath.
If you must, you can either use the system which binary, or you can execute command from within a shell,
which
command
exec.Command("/bin/bash", "-c", "command -v foo")