Author Topic: Multiple entriesin $PATH  (Read 470 times)

0 Members and 1 Guest are viewing this topic.

Offline Keith

  • Hero Member
  • *****
  • Posts: 866
  • Karma: 11
  • Gender: Male
  • Linux Novice
    • View Profile
    • Awards
Multiple entriesin $PATH
« on: December 08, 2018, 08:36:20 pm »
Ubuntu 16.04 on Lenovo Thinkpad T500

My original $PATH was:
/usr/local/sbin:
/usr/local/bin:
/usr/sbin:
/usr/bin:
/sbin:
/bin:
/usr/games:
/usr/local/games:
/snap/bin:

where I have separated the entries for clarity.

I modified my .profile file as follows to include two more directories in $PATH:
# set PATH so it includes user's private bin directories
PATH="$PATH:$HOME/.bin:$HOME/.local/bin"


but $PATH now looks like this:
/usr/local/sbin:
/usr/local/bin:
/usr/sbin:
/usr/bin:
/sbin:
/bin:
/usr/games:
/usr/local/games:
/snap/bin:
/home/keith/.bin:
/home/keith/.local/bin
:
/home/keith/.bin:
/home/keith/.local/bin


Can anyone tell me why my personal paths are present twice in the $PATH variable?
It's not a problem in practice, but really annoying that I can't find the reason for it!

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal