Environment Variables and Shell Rc File

0

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

Posted 2012-05-02T16:46:15.997

Reputation: 437

Question was closed 2012-07-17T00:21:01.270

Answers

1

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

Posted 2012-05-02T16:46:15.997

Reputation: 246