Alternative to .bashrc

Is ~/.bashrc the only place where I can specify user specific ENV Variables, aliases, modifications to PATH variable, etc?
I ask because it seems that ~/.bashrc would be BASH only...

ANSWER:-

The file $HOME/.profile is used by a number of shells, including bash, sh, dash, and possibly others.
From the bash man page:
When bash is invoked as an interactive login shell, ... 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.
csh and tcsh explicitly don't look at ~/.profile but those shells are kinda antiquated.

0 comments:

Post a Comment

Don't Forget to comment

About Me

My photo

HI i am mohammed  a Embedded Software Developer ,SEO specialist,Electronic engineer   Read more

ads