Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-04-2004, 08:29 PM   #1
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Rep: Reputation: 30
.bashrc or .bash_profile?

I have a slight understanding that these files are where we can set a lot of the options in bash. For instance, adding new paths, prompt setup, etc. My question for you guys is, what the heck is the proper way to deal with them. On my RedHat 9 machine, I put the changes in .bash_profile. On my department's Debian machine, I need to put it into .bashrc. Is this distro dependent? Is there a "proper" way for setting personal aliases, etc.?
Old 02-04-2004, 09:08 PM   #2
TBC Cosmo
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
Set env variables in .bash_profile and aliases and prompt customization in .bashrc. In RH .bashrc is sourced from .bash_profile, which in turn gets called by /etc/profile on each user login. Only .bashrc runs each time you open a term. .bash_profile runs once. It should be the same in deb.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
bashrc vs. bash_profile mikeshn Linux - General 9 02-10-2008 01:46 PM
bashrc or bash_profile ? ARCIS_house Linux - Newbie 6 07-21-2005 02:09 PM
.bashrc .bash_profile Soulful93 Slackware 4 05-03-2005 03:02 AM
~/.bashrc, ~/.bash_profile Sinope Linux - Newbie 6 08-17-2004 02:40 AM
.bashrc vs .bash_profile xor3 Linux - Newbie 1 08-16-2003 12:52 PM

All times are GMT -5. The time now is 04:46 PM.

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