I have some duplicates in my PATH I need to remove, however I don't know where they're coming from. I'm on Ubuntu 10.04 with bash, and have checked ~/.bashcr (there's no ~/.bash_profile or ~/.profile). Is there any command that can show the files that add to or set PATH? And more generally, is there a command that can show where any environment variable is being set? asked 10 Aug '10, 20:46 Kurtosis |
try:
this should let you know where your environment is being set for your individual user. however there are global path sets as well, the usual suspects are:
You can grep through them below:
The above assume you are using bash. ksh is below:
answered 10 Aug '10, 21:12 rfelsburg ♦ Thanks! Your greps found it. Though 'echo $env' returns a blank line. Should something be in $env?
(11 Aug '10, 04:38)
Kurtosis
1
Not sure with ubuntu, on redhat based systems it returns the file that your environment loads. In may case it returns /home/$USER/.bashrc
(11 Aug '10, 12:27)
rfelsburg ♦
|