I am using Mandriva 2009.1 and my kernel version is 220.127.116.11-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?
"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?
OK, so what does .bashrc do? Because I have this line in .bash_profile:
if [ -f ~/.bashrc ]; then
Check if .bashrc file exists in your home folder.
Post its contents here.
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.
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
if [ -x /usr/games/fortune ]; then
#Sets the CapsLock key so that it acts like a backspace
setxkbmap -option caps:backspace