[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using ~/.bash_profile
From: |
Greg Wooledge |
Subject: |
Re: Using ~/.bash_profile |
Date: |
Wed, 27 Apr 2022 16:47:29 -0400 |
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.