Results 1 to 5 of 5
I am using Mandriva 2009.1 and my kernel version is 2.6.29.6-desktop586-1mnb
I'm reading a couple of tutorial books to help advance my Linux skills.
Now, the books keep mentioning the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-08-2009 #1
.bashrc .bash_profile
I am using Mandriva 2009.1 and my kernel version is 2.6.29.6-desktop586-1mnb
I'm reading a couple of tutorial books to help advance my Linux skills.
Now, the books keep mentioning the .profile file in the Home folder and /etc/profile.
I found /etc/profile but can't find .profile. The only likely files I can find in the home directory are .bashrc and .bash_profile. Which does what? and which is instead of .profile?
- 07-08-2009 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 468
"When bash is invoked as an interactive login shell, or as a non-interac‐
tive shell with the --login option, it first reads and executes commands
from the file /etc/profile, if that file exists. After reading that file,
it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that
order, and reads and executes commands from the first one that exists and
is readable. The --noprofile option may be used when the shell is started
to inhibit this behavior."
from "man bash"
> which is instead of .profile?
.bash_profilethe sun is new every day (heraclitus)
- 07-08-2009 #3
OK, so what does .bashrc do? Because I have this line in .bash_profile:
Code:if [ -f ~/.bashrc ]; then . ~/.bashrc fi
- 07-08-2009 #4
Check if .bashrc file exists in your home folder.
Post its contents here.Code:cat .bashrc
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 07-08-2009 #5
I know it exists, I've edited it before.
I don't know why it's looking for /etc/bashrc, should I post the contents of that too? As far as I can tell all it does is to check if this is an interactive shell.Code:# .bashrc # User specific aliases and functions # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi #Fortune if [ -x /usr/games/fortune ]; then /usr/games/fortune -s fi #Sets the CapsLock key so that it acts like a backspace setxkbmap -option caps:backspace


Reply With Quote
