LWN.net Logo

useless and useful distinctions

useless and useful distinctions

Posted Jan 27, 2012 5:16 UTC (Fri) by eru (subscriber, #2753)
Parent article: The case for the /usr merge

It is surprising how much passion this trivial issue raises. Having used various Unix and Linux over the years, I got used to random variation in the usage of /bin and /usr/bin, and find it just an irritant that can well be eliminated. Just occasionally wastes a bit of time when porting scripts.

By the same logic, the distinction between the bin and sbin directories could also be eliminated.

By contrast, it would be useful to ghettoize all GUI programs to their own bin. They are typically large, depend on huge shared libraries and data files, and are not needed in all installations. In the distant past they usually lived in /usr/X11/bin. Something like this could be brought back. Probably better name it /usr/gui/bin to not tie it to any particular GUI platform.


(Log in to post comments)

useless and useful distinctions

Posted Jan 27, 2012 8:40 UTC (Fri) by gravious (subscriber, #7662) [Link]

Or maybe call it /Applications

useless and useful distinctions

Posted Jan 27, 2012 10:50 UTC (Fri) by cmccabe (guest, #60281) [Link]

I think it should be called /Bikeshed.

useless and useful distinctions

Posted Jan 27, 2012 12:30 UTC (Fri) by engla (guest, #47454) [Link]

/Applications should better be a place for "packaged" programs that keep all their files together in one place. It's a nice concept from OS X with benefits both high and low.. to begin with you can just copy files into place, instead of trusting a random installer to not spray files over the filesystem ("services" you didn't ask for etc).

useless and useful distinctions

Posted Jan 27, 2012 16:56 UTC (Fri) by raven667 (subscriber, #5198) [Link]

That doesnt always work out that way in practice. Removing an app from /applications doesn't remove any settings or cache files in your home directory or any system wee services or config files. Applications absolutely do spread files around that don't get cleaned up when putting the .app in the trash

useless and useful distinctions

Posted Jan 30, 2012 1:39 UTC (Mon) by slashdot (guest, #22014) [Link]

That is a feature, since it results in uninstallation + reinstallation being a no-op.

useless and useful distinctions

Posted Jan 30, 2012 17:42 UTC (Mon) by rgmoore (✭ supporter ✭, #75) [Link]

The downside is that it means there are old configuration files around when you upgrade. That's OK if you make sure that the new version can't be tripped up by older configuration files, but that's apparently harder than it looks. This isn't terrible when you're upgrading only one application, since you have only one configuration to look through for incompatibilities, but it can be a pain when you're upgrading your whole distribution while trying to keep an old /home. My recent experience is that tracking down configuration incompatibilities takes more time on a distro upgrade than installing all the packages. It's still easier than completely recreating a configuration from scratch would be, but it's a definite area for improvement.

useless and useful distinctions

Posted Jan 27, 2012 14:58 UTC (Fri) by smokeing (guest, #53685) [Link]

Call it (gasp!) /Program Files ?

useless and useful distinctions

Posted Jan 27, 2012 19:44 UTC (Fri) by BenHutchings (subscriber, #37955) [Link]

Well, lots of programs have bugs in dealing with spaces in paths. We might need a symlink to that, say, "/progra~1".

useless and useful distinctions

Posted Jan 27, 2012 11:43 UTC (Fri) by kragilkragil2 (guest, #76172) [Link]

Yeah, I also don't get why we still need sbin directories? Any ideas?

useless and useful distinctions

Posted Jan 27, 2012 12:03 UTC (Fri) by angdraug (subscriber, #7487) [Link]

For one, so that normal user's PATH isn't cluttered with commands that only root is supposed to run. Improves autocompletion, too.

useless and useful distinctions

Posted Jan 27, 2012 12:42 UTC (Fri) by zyga (subscriber, #81533) [Link]

I kind of like being able to tab-complete $ sudo ...

useless and useful distinctions

Posted Jan 27, 2012 17:58 UTC (Fri) by iabervon (subscriber, #722) [Link]

In order to tab-complete "sudo ...", your shell needs a rule that what follows "sudo" is found from $PATH, not cwd. If it has a rule, it can have the rule tab-complete based on /usr/bin and /usr/sbin instead of actually using $PATH (which is likely to include things like ~/bin which won't be in root's PATH, as well as not including /usr/sbin).

useless and useful distinctions

Posted Jan 27, 2012 17:52 UTC (Fri) by sjj (subscriber, #2020) [Link]

FWIW, Fedora has had sbin directories in the default user path since F10.

My personal annoyance is that ifconfig is in /usr/sbin, and I often need to consult it as a regular user.

useless and useful distinctions

Posted Jan 28, 2012 16:42 UTC (Sat) by josh (subscriber, #17465) [Link]

A quick look at the contents of /sbin on my system turns up quite a few programs useful for non-root users, and very few only usable by root. In particular, disk and filesystem utilities work well on loopback files, networking tools provide useful output, and most other binaries have some useful function for non-root (even if just displaying useful output without allowing changes).

useless and useful distinctions

Posted Jan 27, 2012 11:55 UTC (Fri) by sorpigal (subscriber, #36106) [Link]

I like the idea of merging bin and sbin dirs, since the distinction isn't really important in most cases. I would also like to get rid of /usr/bin/games, since its use is not much respected anyway and never made sense (who do games get to be a special class of binary but nothing else does? Throwing all pg* and mysql* tools into a separate dir makes at least as much sense).

I don't think getting into the business of putting binaries into different directories for categorization purposes is more useful than harmful. What is the goal? If it were to be done I think subdirectories of /usr/bin (or /bin if we're not using /usr any more) makes the most sense.

useless and useful distinctions

Posted Jan 27, 2012 21:18 UTC (Fri) by nix (subscriber, #2304) [Link]

That would be /usr/bin/X11, aka /usr/X11R{3,4,5,6}/bin. It was killed for a reason.

useless and useful distinctions

Posted Jan 28, 2012 14:58 UTC (Sat) by Cyberax (✭ supporter ✭, #52523) [Link]

Which is a shame. I actually liked not having all the X programs in tab-completion in X-less terminals and consoles.

But yeah, it wasn't a big deal.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds