Ubuntu should move all binaries to /usr/bin/

Aleksandar Milivojevic alex at milivojevic.org
Tue Dec 6 18:56:03 UTC 2011

On Tue, Dec 6, 2011 at 9:08 AM, Matt Alexander <ubuntu.com at mattalexander.com
> wrote:

> On Mon, Dec 5, 2011 at 5:22 PM, Robert Holtzman <holtzm at cox.net> wrote:
>> On Mon, Dec 05, 2011 at 09:15:11AM -0800, Matt Alexander wrote:
>> > Sure, using find or which, etc., can be used to locate a particular app,
>> > but that's not really the point.  Why not simplify things and put all
>> > binaries under /usr/bin?  Then you don't have to teach users about silly
>> > distinctions like "Oh, see, if it's an app that's meant to be used by a
>> > System Adminstrator, then it goes into /usr/sbin".  Who cares?  Just put
>> > everything in /usr/bin to keep things simple.
>> There are programs that an admin doesn't want users to run.
> You're kidding, right?

There's a lot of history behind /bin, /sbin, /usr/bin and /usr/sbin.  Most
of the reasons behind having them separate don't hold anymore.  For
example, binaries in /sbin used to be statically linked, which isn't true
anymore.  /bin and /sbin used to hold binaries needed to repair system
while booted into bare-bones mode (i.e. single-user) with /usr partition
unavailable (these days, people don't normally have /usr on separate
partition, though some still do it out of old habits).  Etc.

Said that, if you actually look into /sbin, or /usr/sbin, there's not that
many things in there, and it's mostly system binaries users don't care
about that much (when was the last time you used LVM commands as regular
user?).  /bin is relatively small as well.  Moving everything (as in really
everything) isn't as simple as it seems.  You'd break every shell script in
known universe that's referencing /bin/sh, to start with obvious.  Though,
that one could be solved by making /bin a symbolic link to /usr/bin.  Many
binaries and scripts expect things to be in their "historical" locations
would be broken as well.  Wich again could be solved with symbolic link or
two.  However, I don't see why moving really everything under /usr/bin
would be worth the effort.

As for /opt vs. /usr/local.  Personally, I always thought of /opt as place
for large/complex 3rd party packages (kind of equivalent of "C:\Program
Files" in Windows), allowing them not to have to worry too much about
conflicting file names (something that would be constant source of problems
if *all* binaries were to go under /usr/bin), and /usr/local as place for
unpackaged things I compiled directly from source (i.e. place where I don't
have to worry about stumping over an packaged binary).  But that's just my
personal (and likely overly simplistic) view on things.

As for locating particular file on the file system really fast...  Well,
there's this nifty old utility called "locate", that's been around for
like...  forever?  It consists of cron job (not sure if its enabled by
default) that indexes file system periodically, and utility that reads that
database and produces instant results.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20111206/6efc81d1/attachment.html>

More information about the Ubuntu-devel-discuss mailing list