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?

1 Answer 1


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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .