On Tue, Nov 17, 2009 at 3:12 PM, Bob Proulx <b...@proulx.com> wrote: > Peng Yu wrote: >> I make my ~/.bash_profile empty. I still see >> >> $ echo $PATH >> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games > > What is in your ~/.bashrc file? > >> I checked /etc/profile and /etc/bash.bashrc. But I don't PATH is set >> in the two files. I'm wondering from which file PATH is set. BTW, my >> system is ubuntu. > > Are you sure that it isn't being set in /etc/profile? > > It may be the compiled in value. Run strings on your binary and see > what is there. On my Debian system: > > $ grep /usr/bin /etc/profile > PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" > PATH="/usr/local/bin:/usr/bin:/bin:/usr/games" > > $ strings /bin/bash | grep /usr/bin > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Here are what I have. $ grep /usr/bin /etc/profile $ strings /bin/bash | grep /usr/bin /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin