Where to install a 3rd party programs distributed as tar.xz or tar.gz
Solution 1:
Take a look at your $PATH for clues.
$ echo $PATH
/home/YOU/bin -- Yes
/home/YOU/.local/bin -- Yes
/usr/local/sbin -- Yes
/usr/local/bin -- Yes
/usr/sbin -- Never (package manager)
/usr/bin -- Never (package manager)
/sbin -- Never (package manager)
/bin -- Never (package manager)
/usr/games -- Never (package manager)
/usr/local/games -- Yes
/snap/bin -- Never (package manager)
Now let's remove all those locations on your $PATH that are reserved for package-manger-only use:
/home/YOU/bin
/home/YOU/.local/bin
/usr/local/sbin
/usr/local/bin
/usr/local/games
So the best places to manually-install applications are in your /home and in /usr/local.
- Example: Were I installing Project Foo, I might create a new directory
/usr/local/foo
to contain safely all the Project Foo files. That would keep the files separate from my other Project Bar files (in/usr/local/bar
) and Project Baz files (in/usr/local/baz
)
That's not all the possible places. Lots of manually-installed services wind up in /var as well as /usr/local.