Skip to main content
replaced http://superuser.com/ with https://superuser.com/
Source Link

Typically PATH is set to an initial value in a highly system-dependent way by the program that logs you in (pam_env is a common contributor), then /etc/profile and ~/.profile and files that they include go on to modify that value.

Remove any change to PATH in .bashrc, environment settings don't belong in .bashrc: see Difference between .bashrc and .bash_profileDifference between .bashrc and .bash_profile.

First try logging in in text mode (e.g. with ssh localhost), as the session startup is a lot simpler than in graphics mode.

Put set -x at the beginning of /etc/profile and ~/.profile. The shell will print a trace of what it does on its standard error stream; look for assignments to PATH in the trace.

There is no notion of precedence to environment variable assignments: whoever assigns last wins.

Typically PATH is set to an initial value in a highly system-dependent way by the program that logs you in (pam_env is a common contributor), then /etc/profile and ~/.profile and files that they include go on to modify that value.

Remove any change to PATH in .bashrc, environment settings don't belong in .bashrc: see Difference between .bashrc and .bash_profile.

First try logging in in text mode (e.g. with ssh localhost), as the session startup is a lot simpler than in graphics mode.

Put set -x at the beginning of /etc/profile and ~/.profile. The shell will print a trace of what it does on its standard error stream; look for assignments to PATH in the trace.

There is no notion of precedence to environment variable assignments: whoever assigns last wins.

Typically PATH is set to an initial value in a highly system-dependent way by the program that logs you in (pam_env is a common contributor), then /etc/profile and ~/.profile and files that they include go on to modify that value.

Remove any change to PATH in .bashrc, environment settings don't belong in .bashrc: see Difference between .bashrc and .bash_profile.

First try logging in in text mode (e.g. with ssh localhost), as the session startup is a lot simpler than in graphics mode.

Put set -x at the beginning of /etc/profile and ~/.profile. The shell will print a trace of what it does on its standard error stream; look for assignments to PATH in the trace.

There is no notion of precedence to environment variable assignments: whoever assigns last wins.

spelling correction and some extra nonsense to force SE to allow me to make the first change
Source Link

Typically PATH is set to an initial value in a highly system-dependent way by the program that logs you in (pam_env is a common contributor), then /etc/profile and ~/.profile and files that they include go on to modify that value.

Remove any change to PATH in .bashrc, environment settings don't below therebelong in .bashrc: see Difference between .bashrc and .bash_profile.

First try logging in in text mode (e.g. with ssh localhost), as the session startup is a lot simpler than in graphics mode.

Put set -x at the beginning of /etc/profile and ~/.profile. The shell will print a trace of what it does on its standard error stream; look for assignments to PATH in the trace.

There is no notion of precedence to environment variable assignments: whoever assigns last wins.

Typically PATH is set to an initial value in a highly system-dependent way by the program that logs you in (pam_env is a common contributor), then /etc/profile and ~/.profile and files that they include go on to modify that value.

Remove any change to PATH in .bashrc, environment settings don't below there: see Difference between .bashrc and .bash_profile.

First try logging in in text mode (e.g. with ssh localhost), as the session startup is a lot simpler than in graphics mode.

Put set -x at the beginning of /etc/profile and ~/.profile. The shell will print a trace of what it does on its standard error stream; look for assignments to PATH in the trace.

There is no notion of precedence to environment variable assignments: whoever assigns last wins.

Typically PATH is set to an initial value in a highly system-dependent way by the program that logs you in (pam_env is a common contributor), then /etc/profile and ~/.profile and files that they include go on to modify that value.

Remove any change to PATH in .bashrc, environment settings don't belong in .bashrc: see Difference between .bashrc and .bash_profile.

First try logging in in text mode (e.g. with ssh localhost), as the session startup is a lot simpler than in graphics mode.

Put set -x at the beginning of /etc/profile and ~/.profile. The shell will print a trace of what it does on its standard error stream; look for assignments to PATH in the trace.

There is no notion of precedence to environment variable assignments: whoever assigns last wins.

Source Link
Gilles 'SO- stop being evil'
  • 865.3k
  • 205
  • 1.8k
  • 2.3k

Typically PATH is set to an initial value in a highly system-dependent way by the program that logs you in (pam_env is a common contributor), then /etc/profile and ~/.profile and files that they include go on to modify that value.

Remove any change to PATH in .bashrc, environment settings don't below there: see Difference between .bashrc and .bash_profile.

First try logging in in text mode (e.g. with ssh localhost), as the session startup is a lot simpler than in graphics mode.

Put set -x at the beginning of /etc/profile and ~/.profile. The shell will print a trace of what it does on its standard error stream; look for assignments to PATH in the trace.

There is no notion of precedence to environment variable assignments: whoever assigns last wins.