A session in Linux can be either interactive or non-interactive.
* Interactive is when you log in physically, and the environment is populated with whatever is in ~/.bash_profile and /etc/profile
* Non-interactive is like when you execute a script containing the line #!/bin/bash and this populates the environment only with ~/.bashrc and /etc/bash.bashrc
(I put all my stuff in /etc/bash.bashrc like JAVA_HOME, CLASS_PATH, etc, so I know all my programs can see all my env variables)
bashrc can be sourced from the profile, if you wish.
When making changes to your profile, it can be forced/reloaded with:
Code:
you@wherever:~$ source .bash_profile
Gnome-terminal
To attach your profile to gnome-terminal:
Open a terminal. Click on Edit, Profiles..., high-light Default (or whichever you prefer), Edit, go to the Title and Command tab, and tick the box that says "Run command as login shell".
Close the terminal and start another one, and the stuff in your .bash_profile should be loaded now.
PS, also check /etc/login.defs for other options.