In windows, I use the Rapid Environment Editor. It's wonderful and shows me the system and user environment variables broken down into individual entries. Is there such an animal for LINUX? I am so confused by all the places PATH entries can exist -
~/.profile
/root/.profile
~/.bash_profile,
~/bash.bashrc,
~/.bashrc, ~/.profile,
/etc/bash.bashrc
/etc/skel/.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/bash.bashrc
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel/dot.bashrc
/usr/share/base-files/dot.bashrc
/home/stefan/.bashrc
/root/.bashrc
I have read that that ~/.bash_rc is not read by any program, and ~/.bashrc is the configuration file of interactive instances of bash. I should not define environment variables in ~/.bashrc. The right place to define environment variables such as PATH is ~/.profile (or ~/.bash_profile)
I am trying to add the PATHs for luarocks and the LUA_PATH for same.
So the PATH is not just for the terminal to read so it knows where to look for commands that I enter there. Rather, it seems OTHER programs ALSO use the PATH for their own nefarious purposes. That seems like a security risk BTW and I wonder if certain files containing the PATH variable have different priviledges than others. So for example, if I want a program other than terminal to execute a certain linux program, then I want it to look in only less secure locations.