Ubuntu environment variables

The easiest way to set an environment variable in Ubuntu is to set it in the /etc/environment file.

Setting it in your bash_profile or bashrc file doesn’t work for me. There’s a Debian historical reason behind it, and no doubt more details. But if you want a quick way to set your LD_LIBRARY_PATH for the intel fortran compiler, that’s it.

My environment file looks like this:


PATH="~/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:
/usr/bin/X11:/usr/games:/opt/intel/fc/9.1.036/bin:
/usr/local/mpich-1.2.7p1/bin:PATH"
LD_LIBRARY_PATH="/opt/intel/fc/9.1.036/li"
LANG="en_AU.UTF-8"

note: this is an old post and I don’t find myself using Ubuntu a lot now, especially as an computer administrator. If it turns out this is wrong or out of date let me know.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: