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.
Leave a Reply