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
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
Try the command "printenv". While it doesn't show where things are set, it shows what is set and often helps to pinpoint where the duplications arise.
You can get further details from:
answered 11 Aug '10, 15:01
$PATH will show what is in your PATH For me it shows: bash: /usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/surfraw:/usr/lib/surfraw:
Running Debian sid.
answered 12 Aug '10, 01:42
and, if you want to know where does the library load, then you should change file /etc/ld.so.conf , add your new library path here...
answered 17 Aug '10, 11:49