Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old October 22nd, 2004   #1
gecko
5 Cups of Ubuntu
 
Join Date: Oct 2004
Location: Sydney
Beans: 20
Send a message via MSN to gecko
HOWTO: Environment Variables

Environment Variables

Environment variables for a specific command
To set a variable for just a one off you can specify the variable on the command line itself as follows...

NAME=VALUE COMMAND PARAMETERS

Example
http_proxy=http://localhost:8080/ apt-get update

NB: You can have multiple name=value pairs seperated by spaces.

Environment Variables for the shell/command line
To permanently add an environment variable you add the following lines to the relevant rc file. Th rc file is read whenever a terminal is opened from the ubuntu desktop. For a program that runs as a specific user you need to add them to the /home/username/.bashrc file. For programs that require sudo access you add these lines to the /root/.bashrc file.

NAME=VALUE
export NAME

Example

http_proxy=http://localhost:8080
export http_proxy

Environment variables for the gnome desktop
To permanently add variables for the Gnome desktop, you add lines to the ??? file. Please add this information.

Contribute!
If you find more information on environment variables then please add them as a reply to this post. Corrections should be sent to the author of his or her post.

Gecko
gecko is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:29 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry