LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-04-2004, 12:15 AM   #1
tearinox
Member
 
Registered: Aug 2003
Location: you dont want to know
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348

Rep: Reputation: 30
Where are variables permaninently stored?


Okay, I know that variables such as ( ~ ) mean the users home directory. But where does Linux actually store this variable?'

Thanks.
 
Old 06-04-2004, 01:13 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
They aren't variables per se. Your shell takes the command and replaces the ~ with your home directory; it's part of your shell's source code. It knows where your home directory is by reading the /etc/passwd file and matching your user name with the appropriate entry in the file.
 
Old 06-04-2004, 01:35 PM   #3
oldyas
Member
 
Registered: Jun 2004
Location: Bristol, UK
Distribution: SuSe
Posts: 53

Rep: Reputation: 15
If you're wanting to have aliases created and variables exported every time you start BASH, look in ~/.bashrc .
 
Old 06-04-2004, 09:36 PM   #4
jspenguin
Member
 
Registered: Feb 2003
Location: Wichita, KS
Distribution: Heavily modified Redhat
Posts: 194

Rep: Reputation: 30
It doesn't actually look in /etc/passwd, it just looks at the environment variable $HOME.
 
Old 06-05-2004, 10:42 AM   #5
tearinox
Member
 
Registered: Aug 2003
Location: you dont want to know
Distribution: Gentoo 2004.2, Slackware 10, Windows XP, Windows 2003 Server
Posts: 348

Original Poster
Rep: Reputation: 30
Alright, I tried the .bashrc to set some of my personal variables I like. But it didn't work.

Then I tried setting variables in .bash_login and it works now

Thanks guys.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are environment variables stored? binarybob0001 Linux - General 8 11-15-2005 08:54 PM
where are the environment variables stored? ojav Linux - Newbie 3 05-31-2005 04:00 PM
where does static and global variables stored raviksp General 0 04-28-2005 12:23 AM
commands stored into variables? benne Programming 2 11-15-2004 07:20 PM
Where are the environmental variables (eg. $DISPLAY) stored? davidas Linux - Newbie 2 04-08-2004 01:33 AM


All times are GMT -5. The time now is 03:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration