0

I am running an interactive non-login shell

$ echo $-
himBH

$ shopt login_shell
login_shell     off

which means that only ~/.bashrc should be read. However even with no PATH in ~/.bashrc, PATH is still defined

$ grep PATH ~/.bashrc | wc
      0       0       0

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Where is this definition coming from?

Zombo
  • 1
  • 62
  • 391
  • 407
  • 3
    there's `rc` files for the shells in `/etc`, usually. they set the system-wide defaults for the shells, which then get overriden/modified by the per-user `rc` files in the user's home directory. – Marc B Jan 19 '14 at 04:49
  • How are you starting this bash? what is the $PATH inside the login shell from which you are launching this bash? – stew May 06 '14 at 19:44

0 Answers0