LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .bashrc not working (https://www.linuxquestions.org/questions/linux-newbie-8/bashrc-not-working-200510/)

BattousaiX 07-02-2004 09:21 PM

.bashrc not working
 
When I installed Slackware 10.0 I upgraded the kernel to 2.6.7 as soon as I installed. And I've been trying for the longest to get the ~/.bashrc file to work. I hear it's a bad idea to use root, so I've made my own account and started using it...

I had no bash files in my home directory besides, bash_history, until I created .bashrc. I hear that this file is supposed to be called everytime it's ran or a new shell is opened. The only way I can get this is when I call it myself, and even then all that happens is "Executed appears". I want the path to be added to my $PATH.

Does anyone know what I'm doing wrong? Here is a copy of my .bashrc
Code:

export PATH=$PATH:/home/battousaix/applications/rar

echo "Executed"


init 07-02-2004 09:31 PM

easy fix would be to put that in your .bash_profile (touch .bash_profile)

The .bashrc usually gets sourced after it looks in your home dir for a .bash_profile.
Most people us a if statment in there .bash_profile to look for .bashrc

Sounds a bit confusing and I am not exactly sure why this is done that is a question I must ask..

BattousaiX 07-02-2004 09:35 PM

Code:

mv .bashrc .bash_profile

./.bash_profile

Still the $PATH has not changed.

Thanks for the fast reply ;)

init 07-02-2004 09:49 PM

try this

Code:

. .bash_profile
That will source it.

Code:

echo $PATH
to check if it worked.


*edit* It will do this at boot but since you didnt have the file you need to do the . .bash_profile thing;)

BattousaiX 07-02-2004 09:52 PM

Thanks. It worked. :)

BattousaiX 07-02-2004 09:56 PM

Init can you login AIM?

init 07-02-2004 09:58 PM

Im on.... my aim name is in my profile


All times are GMT -5. The time now is 11:37 PM.