help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using ~/.bash_profile


From: Eduardo Bustamante
Subject: Re: Using ~/.bash_profile
Date: Wed, 27 Apr 2022 13:45:33 -0700

On Wed, Apr 27, 2022 at 1:41 PM goncholden via <help-bash@gnu.org> wrote:

> It is said that ~/.bash_profile is used for setting the prompt appearance.
> I just made a ~/.bash_profile file that appends a directory to PATH. The
> problem is that `echo $PATH` does not show the additional path, There is
> also a ~/.profile file. Previously I was using my .bashrc to set
> environmental variables and variables for prompt appearance (PS1, PS0).


>From the bash manual:

> When bash is invoked as an interactive login shell, or as a
non-interactive 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.

Are you starting bash as a login shell?

You can verify if you are with:

$ shopt login_shell
login_shell     on


reply via email to

[Prev in Thread] Current Thread [Next in Thread]