2

I installed some packages like brew via terminal which altered $PATH. Now iTerm's $PATH is not same as terminal, causing CLI commands like brew not working on iTerm.

echo $PATH on terminal gives:

/usr/local/opt/python/libexec/bin:/Users/avinashvarma/.rbenv/shims:/Users/avinashvarma/bin:/Users/avinashvarma/.rbenv/shims:/Users/avinashvarma/.nvm/versions/node/v6.10.0/bin:/Users/avinashvarma/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/munki:/Users/avinashvarma/gocode/bin:/Users/avinashvarma/gocode/bin

echo $PATH on iTerm gives:

/usr/bin:/bin:/usr/sbin:/sbin:/Users/avinashvarma/gocode/bin

I created a $PATH in .bashrc file but later deleted it and restarted system.

without the presence of .bashrc and .bash_profile no user-defined config should affect the shells.

Any ideas?

Eliah Kagan
  • 4,065
  • 2
  • 24
  • 38
  • 1
    Can you **[edit]** with more info? What version of macOS is this? In either Terminal or iTerm (it'll be the same), what is the output of `launchctl getenv PATH`, `cat /etc/paths`, `ls -lF /etc/paths.d`, `cat /etc/profile`, `cat /etc/bashrc`, `cat /etc/bash.bashrc`, `ls -ldF ~/.*bash*`, `cat ~/.bashrc`, `cat ~/.bash_profile`, `cat ~/.bash_login` and `cat ~/.profile`? Errors are expected; please include them. But please show output of these commands in *both* Terminal and iTerm, as the results *may* differ: `echo "$-"`, `shopt login_shell`, `echo "$0"`, `echo "$BASH"` and `echo "$BASH_VERSION"`. – Eliah Kagan Nov 15 '17 at 06:43
  • 1
    @EliahKagan thanks for the help. but i just removed Iterm and installed again since it a recent install it worked – Sagi_Avinash_Varma Nov 15 '17 at 07:33

0 Answers0