Can I set the global value of an environment variable after having logged in? That is achieve the effect of having set it in ~/.profile.

  • What variable do you want to set? – ctrl-alt-delor Jul 21 '19 at 13:31

Yes you can however any executable that are launch before will not get the new value.

Just use :

export TMOUT=100
export FOO=bar

If you are in text session (putty/ssh) this is probably OK, if you are in a GUI session, this may cause problems if variable to be set are use by GUI programs.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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