LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-28-2007, 04:37 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
.bash_profile


Quote:
Appending text to environment variables like your PATH should not be done in the .bashrc, because it gets run often when subshells are started. Place lines like this in your ~/.bash_profile:

PATH=$HOME/bin:$PATH # Adds to path, only in .bash_profile
That's according to the wiki at LQ about bash.

What about setting enviornment variables instead of appending? Which dot bash file should they be put in? Should these be put in .bashrc or .bash_profile and why and why not?

Code:
export BROWSER=evolution
export EDITOR=vim
MAIL=/var/spool/mail/chris && export MAIL
 
Old 11-28-2007, 06:07 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
I personally would use ~/.bash_profile due to the reasons explained here.

Last edited by reddazz; 11-28-2007 at 06:13 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash_profile strycnine Slackware 5 10-22-2006 02:11 PM
.bash_profile nguye103 Linux - Software 3 10-22-2004 01:48 PM
where is ~/.bash_profile? Jskill007 Slackware 4 09-17-2004 11:04 PM
.bash_profile praveenv Linux - Newbie 3 08-14-2004 12:58 PM
.bash_profile wildcat22 Linux - General 3 04-13-2004 07:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:06 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration