1

What are the main differences between /usr/bin and /usr/local/bin?

I have noticed on different machines that, when I install Vim (or sometimes it is already installed), sometimes it is located in the local component, and sometimes it is not.

What is the difference between the two, if any?

4

Linux Filesystem Hierarchy Standard

4.9.1. Purpose


The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.

Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.

Structure is similar to /usr, but is for site local software. Something you build yourself, or want to install an alternative version. configure scripts call this the prefix, often defaulting to the equivalent of ./configure --prefix=/usr/local. In contrast, distribution provided "system" packages tend to use /usr. So by default, your custom-built /usr/local/bin/vim will not be accidentally overwritten when the system package is upgraded.


As system administrator, you should understand how software is being installed, because your responsibilities likely include maintaining it. Query any package database for the files in question. Find out who's been running make install from source.

| improve this answer | |
  • 1
    It's worth stating for OP that whomever has done it has root. A standard user cannot install software in /usr/local. – Aaron Copley Jul 14 at 23:55
  • /usr/local was a replacement for /usr/bin (user owned binaries) and is deprecated since 32 years. – schily Jul 16 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.