Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've read quite a number of discussions about people wanting to merge /bin and /sbin into /usr/bin. The same cannot be said for doing it the other way around.

Is there any technical reason why one would not want to merge /usr/bin and /usr/sbin into /bin, or is it mainly a personal preference/design choice?

share|improve this question
3  
possible duplicate of /usr/bin vs /usr/local/bin on Linux –  jasonwryan Mar 24 at 21:45
    
I'm well aware of what they're used for. I'm really more interested in why people (I think Fedora did that) chose to merge everything into /usr/bin rather than the other way around. Obviously, it's not really necessary to follow the original intention of /bin and /sbin anymore. At least not on the desktop. I was going to design my own, Debian based distro and this is something I have been pondering with. Just seems more elegant to me to have all applications in /bin. –  user237251 Mar 24 at 21:51
    
I think Fedora did that Fedora symlinked /bin, /lib, /lib64 and /sbin to /usr/bin, /usr/lib, /usr/lib64 and /usr/sbin. /bin and /sbin are still separate. –  Dennis Mar 24 at 23:56

2 Answers 2

The reason that things were merged to /usr and not to / are noted in The Case for the /usr Merge:

Myth #11: Instead of merging / into /usr it would make a lot more sense to merge /usr into /.

Fact: This would make the separation between vendor-supplied OS resources and machine-specific even worse, thus making OS snapshots and network/container sharing of it much harder and non-atomic, and clutter the root file system with a multitude of new directories.

share|improve this answer

You are correct, Fedora is the avante garde of this, although freedesktop.org, an independent body, then took up the cause in hope of encouraging it pan-linux.

According to this, the merge follows a pattern started by Solaris, the "primary commercial Unix implementation". It is interesting in the sense that the original Unix used /bin, and so getting rid of the split might have meant making the directories in /usr symlinks instead of the other way around.

However, considering that option, linking the toplevels is probably more straight forward and obvious.

share|improve this answer
    
Thanks for that info. I was actually just trying to symlink /sbin but ended up with a system that was no longer able to boot on it's own ("command /sbin/init not found"). Is this because of the symlinks inside /sbin? I set up a directory inside /bin called "utils", copied all files from /sbin there (using the -rp flag), deleted /sbin and set up a symlink called sbin, pointing toward /bin/utils. –  user237251 Mar 31 at 9:37
    
Here's a guess: /sbin/init is itself often a symlink. "init" is the canonical name of the first process; it's the only process actually started by the kernel and cannot be killed, so it is always PID 1 (have a look at, e.g., ps -lp 1). systemd (fedora) and upstart (ubuntu) are new-fangled init systems that symlink their binary from /sbin/init so the kernel can find it. On my fedora here, that link is literally ../lib/systemd/systemd, so if you moved it to /bin/utils the link would be broken (that's not the only symlink in /sbin, either). –  goldilocks Mar 31 at 12:30
    
Thanks. Got it now. For some reason, I was approaching the whole thing from the wrong side. I just generated a list of all symbolic links found on the system. Something that also happened to slightly clear up my earlier confusion as to why people would merge into /usr/bin, rather than the other way around. It's simply way more straight forward, as one doesn't need to care about breaking third party packages. –  user237251 Apr 1 at 9:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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