Download your favorite Linux distribution at LQ ISO.
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 08-09-2004, 02:31 PM   #1
Registered: Nov 2003
Posts: 57

Rep: Reputation: 15
Question .bashrc, .bash_profile, .bash_confused


I have searched a bunch online but I'm still not able a website which makes this clear.

I have a file ( .alias ) which stores all of my aliases that I normally used. Until recently I was just logging in to my workstation from a terminal and my .alias file was sourced just fine. I Have a file called .login which contains the line "source .alias" and there was no problem.

Now I have a new workstation which I used a terminal window launched from gnome. I can type "source .alias" from the command line and it's fine but I can't seem to get it to automatically read my aliases when I launch the terminal window.

I have tried to modify .bashrc (added source .alias) and .bash_profile (added source .bashrc) with no luck.

Can someone

1) explain what is going on, and
2) tell me what to do to fix the problem?

Old 08-09-2004, 02:48 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Basically, .bash_profile is invoked for login shells and .bashrc is invoked for non-login shells. So what you did ought to work. If not, make sure your shell is being invoked as bash (and not sh) -- echo $SHELL should tell you which it is. If it is being invoked as sh you can use chsh to change it to bash. Otherwise, you can put an echo statement into your .bashrc to make sure it is being invoked. What happens when you try to source .bashrc directly from the terminal?
Old 08-09-2004, 03:19 PM   #3
Registered: Nov 2003
Posts: 57

Original Poster
Rep: Reputation: 15
figured it out,

the shell launched w/ the gnome-terminal was tcsh so I just made a file .tcshrc with " source .login "

now I'm golden!


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 or .bash_profile? statmobile Linux - Newbie 1 02-04-2004 09:08 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:36 AM.

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