If I issue
sudo my-command
how does Linux look for that my-command
?
The my-command
is in my PATH. I can invoke it without any problem. However, when I invoke it with sudo
, I'll get command not found
.
How to overcome it?
EDIT: That "Possible duplicate"'s selected answer is wrong, well, at least not to the point. This answer, from terdon, is the correct one.