Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

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.

1 Answer

up vote 1 down vote accepted

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

VARNAME=new_value_of_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

share|improve this answer
add comment

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