View Full Version : [all variants] dissapearing Shell variables
December 7th, 2009, 03:14 AM
I installed the Go compiler and when I set the shell variables:
And then it works fine, but when i close the console window, and then open again the shell variables have dissapeared :confused:
December 7th, 2009, 04:04 AM
Environments are on a per-shell basis. That is, per-shell-instance -- multiple terminal windows will be running different instances of the shell and thus have different environments.
Add the 'export' commands to your ~/.bash_profile file so that every bash invocation will use 'em.
December 7th, 2009, 04:07 AM
Better to put them in your .bashrc -- in my experience, .bash_profile isn't executed unless you log in through a tty.
December 7th, 2009, 12:34 PM
It works perfectly now, thanks for helping.
So, .bashrc is a kind of script which executes everytime I open a console ?
December 7th, 2009, 01:37 PM
More or less, yes. To be more specific, its executed each time Bash is started by a user.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.