Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Ubuntu 10.04. I want to define some environment variables that will be available anywhere, anytime, including from Eclipse. Where is the best place to put them? ~/.bashrc? ~/.profile? /etc/environment?

Why are there so many places to define settings?

share|improve this question
What desktop environment are you using? What window manager? – Keith Aug 28 '11 at 11:39
I use gnome desktop. How can I know what window manager I use? – Erel Segal-Halevi Sep 4 '11 at 6:32
@Erel: If you're using a full DE such as GNOME or KDE, the window manager is not important. (GNOME uses either Metacity, Compiz, or Mutter.) It only makes a difference when the WM is being used standalone. – grawity Dec 15 '11 at 14:04
up vote 0 down vote accepted

~/.profile might be the best place – it is read for graphical logins (GDM), console logins, and even SSH. (The latter two only if neither ~/.bash_profile nor ~/.bash_login exists, though... but GDM always reads it.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.