The env
variables I set are getting reset to the previous values after closing the current instance of the bash
console. How to set or unset those variables without getting them reset everytime? I am using OpenSuse 12.3 with bash 4.2
1 Answer
export
only sets variables for that shell. To make it available to all shells, you'll need to add the variables to ~/.bashrc
(for your user account) or to /etc/bashrc
(for all accounts on the system): https://marylou.byu.edu/documentation/unix-tutorial/unix9.php
These configuration scripts are called when you first start bash, so any environment variables you define in there would be defined for all shells.
export
to set variables?export
export
makes environment variables available to child processes. It has nothing to do with persistence and will not help this problem.