https://unix.stackexchange.com/questions/259231/difference-between-usr-bin-and-usr-local-bin
/usr/bin : contains executable programs that are part of the operating system and installed by its package manager
/usr/local/bin : default location for executable programs not part of the operating system and installed there by the local administrator, usually after building them from source with the sequence configure;make;make install. The goal is not to break the system by overwriting a functional program by a dysfunctional or one with a different behavior.
When the same program exists in both directories, you can select which ones will be called by default by rearranging the order of the directories in your PATH.
// For example
/usr/local/bin ->
djagon-admin
dockerc-compose
pip
# All custom application installed by user
//
/user/bin/python3 -> /etc/alternatives/python3
/etc/alternatives/python3 -> /user/bin/python3.10 (Executable)
https://unix.stackexchange.com/questions/599341/what-is-the-difference-between-usr-lib-and-usr-local-lib
: /usr/local/lib is meant for libs that you installed (compiled) yourself. /usr/lib is for libraries your distribution(System) provides.
/usr/lib/python3/dist-packages (Entire python 3 on ubuntu)
VS
/usr/local/lib/python3.10 (Specific python version installed by user)
https://superuser.com/questions/71958/differences-between-the-many-lib-folders-in-linux#:~:text=%22bin%22%20is%20used%20for%20executables,%2Fusr%2Flocal%2Flib.
"bin" is used for executables, "share" for data files, "lib" for shared libraries and so on. So if your program is a library, you can install it by default to /usr/local/lib
No comments:
Post a Comment