nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Linux set environment variables in my shell

This is a discussion on Linux set environment variables in my shell within the Shell scripting forums, part of the Development/Scripting category; How do I set environment variables in my shell? it should remain after a reboot TIA...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 12-30-2006, 04:58 AM
Member
User
 
Join Date: Feb 2005
Posts: 66
Rep Power: 0
chiku
Default Linux set environment variables in my shell

How do I set environment variables in my shell? it should remain after a reboot

TIA
__________________
There's no place like 127.0.0.1
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-30-2006, 05:05 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Add to /etc/profile for system-wide effector to /home/you/.bash_profile startup file.


If you are using BASH / KSH type
Code:
export VARIABLE-NAME=VALUE  	
export VAR1=foo
If you are using BASH CSH type
Code:
setenv VARIABLE-NAME=VAULE 	
setenv VAR1=foo
If you are using SH type
Code:
set VARIABLE-NAME=VALUE 	
set VAR1=foo
More info @
http://www.cyberciti.biz/faq/environ...bsd-unix-bash/
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Download Linux Shell scripting tutorial v1.06 lsst.zip nixcraft Shell scripting 33 11-02-2008 07:11 PM
Linux UNIX SFTP in a Shell Script Nishanthhampali Shell scripting 1 01-30-2008 02:16 PM
Fold Command with variables Wannabee Shell scripting 1 09-27-2007 04:28 AM
Variables scope fahur Shell scripting 3 04-13-2007 12:56 PM
How to change the login shell for Linux user chimu Getting started tutorials 0 01-26-2007 08:20 PM


All times are GMT +5.5. The time now is 06:47 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36