Whenever I try run a program like this "sudo mono Program.exe" or from a bash script.
I get the error:
mono: command not found.
I am running a VPS on CentOS 6 x64 bit.
Try the command
and see which path is returned. I'm not sure on how Mono is installed, but it's possible that you could be running the executable from your home directory, instead of somewhere like '/usr/bin'.
Try creating a new temporary user and executing mono then and see if you get the same error. It seems likely that the program isn't in a location that is included in your Path variable, so it's possible that it didn't install correctly and/or you or the installer didn't move the program to /usr/bin or /usr/local/bin
You are running
As a user you have a path. You type 'sudo (something) and your shell find the sudo binary in your path and starts it.
Sudo causes you yo switch from your user to uid 0 (root) and the path which is set for this root user.
The latter path can be difference. In which case you get the 'file not found'.
Either specify the full path (e.g.