I am not sure where to install such programs in Linux systems. Are there any conventions? They can just reside in the home directory and be ran from there as well. But is that the correct way of installing them? What are my options?
Asked
Active
Viewed 3,387 times
1 Answers
5
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/footo 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.
user535733
- 68,493