Possible Duplicate:
What are PATH and other environment variables, and how can I set or use them?

I am trying to automatically establish a connection with Amazon s3 using keys. This documentation provides instructions but I am unsure of how to set environment variables and where my shell rc file is located.

Using linux, how do I set environment variables and what/where is a shell rc file?

marked as duplicate by Daniel Beck, Doug Harris, Renan, Simon Sheehan, Journeyman Geek Jul 17 '12 at 0:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


This depends on which shell your using. I'm going to assume you'll be using bash. To set an environment variable:

export VARNAME

If you want the changes to be persistent you should add these commands to the file $HOME/.bash_profile

For bash the rc file is $HOME/.bashrc

You can find out which shell you are using with the command echo $SHELL. If you are using something other than bash I can update this for whatever shell you're using

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