2

I'm quite a newbie, but I know every time you start Terminal, some files are taken into account; and among those there is ~/.profile, which contains the following lines:

if [ -d "$HOME/bin" ] ; then
  PATH="$HOME/bin:$PATH"
fi

I created the directory ~/bin because I want to put there some personal stuff. I closed Terminal and re-opened it, but PATH doesn't include ~/bin. So, as an experiment, I added a stupid

echo "hello world!"

at the bottom of ~/.profile, saved changes and re-logged in with terminal, but nothing. It seems that file is totally ignored.

Am I wrong? Or something changed?

user665110
  • 123
  • 4

1 Answers1

2

~/.profile may be read for login shells, but not by manually opening gnome-terminal.

If you are on a desktop, ~/.profile is sourced by the display manager at login. So if you relogin, your ~/bin folder will be prepended to PATH.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94
  • I think I should learn what is a login shell first. Anyway: I logged out and logged in again and it works. Thanks a lot. – user665110 Jun 25 '20 at 10:38