help-bash
[Top][All Lists]
Advanced

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

Re: Using ~/.bash_profile


From: goncholden
Subject: Re: Using ~/.bash_profile
Date: Wed, 27 Apr 2022 20:53:42 +0000

------- Original Message -------
On Wednesday, April 27th, 2022 at 8:47 PM, Greg Wooledge <greg@wooledge.org> 
wrote:


> On Wed, Apr 27, 2022 at 08:33:13PM +0000, goncholden via 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).
>
>
> Which dot files are actually used depends on what operating system
> you're running, and HOW you are logging in.
>
> The ~/.bash_profile is only read by a login shell. Which you would get
> if you logged in directly on a Linux text console, or a serial terminal,
> or via ssh.
>
> If you login with a graphical display manager (xdm, lightdm, gdm3, sddm,
> and so on), you do NOT get a login shell, therefore ~/.bash_profile may
> never be read at all.
>
> If setting your PATH and PS1 variables in ~/.bashrc has been working
> for you, then you should continue doing that. It will be much simpler
> than anything else you can do under a graphical login.

You are correct Greg.  Things get complicated when splitting the setup in the 
various
files and figure out what is being executed and in which order.  I am using 
Trisquel 9,
that uses Ubuntu 18.04 LTS.  I found ~/profile in the installation, but thore 
is no
~/.bash_profile.  Then I included it.  Ending up with a big mess.






reply via email to

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