Saturday, December 4, 2010

Sudo PATH problem

I was having problems getting sudo to see my Android adb tool. My own path was set correctly but sudo reported command not found. Putting the following in my /bashrc solved it:
    alias sudo env PATH=$PATH

Thanks to http://stackoverflow.com/questions/257616/sudo-changes-path-why/257666#257666

Additionally, if you want to go full blown superuser, execute
    su -p
The '-p' preserves your PATH for use as superuser

No comments:

Post a Comment