Artificial intelligent assistant

Puzzle over sudo and paths I have a couple of programmes which are in `/usr/local/bin` which require root privileges to run. If I run sudo my_prog I get sudo: my_prog: command not found I have to write sudo /usr/local/bin/my_prog for the programme to work. Could anybody explain to me why I have to do this? `/usr/local/bin` is in the root's `$PATH` and in mine.

You can have `/usr/local/bin` in the root's `$PATH` but just doing `sudo` does not give you root's profile where that `PATH` is set

you will get it after logging on as root with


su -


or


sudo -i


Those give you a root shell.

If you want to stay on one line, try using


sudo su -c 'my_prog'


if that doesnt work enforce it with -l


sudo su -l -c 'my_prog'

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 6302887f153f7c0834f7f7f71230916a