sudo PATH and bash

I just spent a bit of time troubleshooting a path issue with sudo on a CentOS server.  This is a note to self to preserve this bit of knowledge.

When dealing with sudo, the only time the PATH environment variable will be preserved is if it’s in .bashrc and NOT in .bash_profile.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *