LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-02-2004, 10:21 PM   #1
BattousaiX
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Rep: Reputation: 0
.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"
 
Old 07-02-2004, 10:31 PM   #2
init
Member
 
Registered: Oct 2003
Location: Portland, Maine
Distribution: Gentoo 2004_2 2.6.7r14
Posts: 160

Rep: Reputation: 30
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..
 
Old 07-02-2004, 10:35 PM   #3
BattousaiX
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Code:
mv .bashrc .bash_profile

./.bash_profile
Still the $PATH has not changed.

Thanks for the fast reply
 
Old 07-02-2004, 10:49 PM   #4
init
Member
 
Registered: Oct 2003
Location: Portland, Maine
Distribution: Gentoo 2004_2 2.6.7r14
Posts: 160

Rep: Reputation: 30
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

Last edited by init; 07-02-2004 at 10:50 PM.
 
Old 07-02-2004, 10:52 PM   #5
BattousaiX
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks. It worked.
 
Old 07-02-2004, 10:56 PM   #6
BattousaiX
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Init can you login AIM?
 
Old 07-02-2004, 10:58 PM   #7
init
Member
 
Registered: Oct 2003
Location: Portland, Maine
Distribution: Gentoo 2004_2 2.6.7r14
Posts: 160

Rep: Reputation: 30
Im on.... my aim name is in my profile
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
.bashrc isn't working David the H. Linux - General 15 08-04-2004 03:51 AM
.bashrc help shanenin Linux - Software 4 02-14-2004 07:17 PM
.bashrc f0rmula Linux - Software 24 12-28-2003 10:43 PM
Where is .bashrc? Luantum Slackware 3 12-01-2003 01:29 AM
no .bashrc? mattman Slackware 6 06-10-2003 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration