Skip to main content
2 of 2
added 1 character in body
Tim
  • 106.8k
  • 234
  • 651
  • 1.1k

Which PATH does `sudo <command>` use to search for `<command>`?

I installed eclipse in my home directory, and put its path in PATH in ~/.profile.

So it works by

$ eclipse 

But when call it with sudo, eclipse isn't found:

$ sudo eclipse 
sudo: eclipse: command not found

Which PATH does sudo eclipse use to search for eclipse? Is it the user root's PATH?

Thanks.

Tim
  • 106.8k
  • 234
  • 651
  • 1.1k