Saving those Magic Ubuntu Environment Variables

Hello World!

This one is more for me than for you.  I often find a piece of software that needs just some magic environment variable set with some magic path that never seems to get properly configured during installation.  Below is an example of how to get that path set, and then ensure it is always set when you log on to the server from then on out.

# These instructions are for bash
$ echo $SHELL

# Check the current value of your envvar
$ echo $CAFFE_ROOT

# Add the envvar to ~/.profile so it will load automatically when you login
$ echo "export CAFFE_ROOT=/home/username/caffe/" >> ~/.profile

# Load the new configuration
$ source ~/.profile

# Check the new envvar value
$ echo $CAFFE_ROOT

Leave a Reply

Your email address will not be published. Required fields are marked *