7

Echoing path in ubuntu returns following colon separated paths,

/home/stack/bin:/home/stack/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

In these paths at some places there is local while at others .local is used what is the difference between both?

muru
  • 207,228

3 Answers3

10

Note that the .local is used in only one place: inside your home directory. The others are all /usr/local. /usr/local is where programs installed outside of the package manager are supposed to add things, so various folders in it are added to PATH by default.

~/.local is analogous to /usr/local, but for programs installing (or otherwise writing data) to your home directory (for example, pip), so .local/bin is also added to PATH. The directory structure in .local is similar to that of /usr/local, which in turn is like that of /usr.

For more information, see:

Olorin
  • 3,548
3

in this particular case, local is a visible directory, and .local is a hidden directory. you can see list of all hidden directory and/or files in a certain directory using ls -a or ls .* command.

arryph
  • 659
2

Files and directories with a preceding . are hidden items.

wjandrea
  • 14,504
guyd
  • 987