1

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?

Dru
  • 537

1 Answers1

2

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

seanwatson
  • 266
  • 1
  • 9