Why does /usr/local/bin not exist on my (Ubuntu 16.04) system?

Solution 1:

/usr/local/bin and other default folders such as the ones you mentioned and also /opt and /mnt are created during a normal Ubuntu installation. By default the folders are empty. If you don't have the folder, it simply means it has inadvertently been removed.

This is easily rectified just by creating the folder:

$ sudo mkdir /usr/local/bin

You can proceed to install your previously installed programs just as you normally would have, if the directory had not been deleted, after recreating it.

And more directly to your questions:

  • Why doesn't it exist by default?
    It is created by default during installation.
  • How did it come to exist in your previous installation?
    It's part of the default directory structure which was created during installation.