In Fedora 40, the /usr/bin and /usr/sbin directories are planned to be unified

Fedora

The Fedora Project is an open project sponsored by Red Hat and supported by the community.

On Fedora mailing lists a proposal has been made known quite interesting, and that is The possibility of merging the contents of the /usr/biny and /usr/sbin directories has been considered, replacing the /usr/sbin directory with a symbolic link pointing to /usr/bin.

And although this proposal may not represent a big change, it is worth mentioning that tIt has some interesting implications. for both users and developers, as the conversion of /bin and /sbin to symbolic links to /usr/bin and /usr/sbin was done in Fedora 17.

The separation of bin and sbin were originally introduced to distinguish between programs intended for users standard and administrative programs. However, in practice this distinction has become less relevant, especially when different distributions place executable files differently between the bin and sbin directories.

The original split was to have "important" binaries statically linked in /sbin that could then be used for emergency and rescue operations. Obviously, we don't do static links anymore. The split was later reused to isolate "important" binaries that would only be used by the administrator. While this sounds attractive in theory, in practice it is very difficult to categorize programs like this, and normal users routinely invoke programs from /sbin.

Note that separating executable files into bin and sbin directories is an obsolete practice that has lost its meaning in modern distributions. Initially, usr/bin was understood to host essential programs executable by the user, while /usr/sbin contained the most important executable files, tied to system administration, which typically required root privileges.

The proposal to unify the directories /usr/bin and /usr/sbin within the system It is a significant change that seeks to simplify the structure of the system and make it more coherent. Over the years, the distinction between /usr/bin and /usr/sbin has become less clear, as the PATH environment variable includes both directories by default on many distributions.

Most programs that require root privileges for "certain" operations are also used when operating without privileges. And even when privileges are required, they are often acquired dynamically, for example using `polkit`.

 With the advent of systemd this has become more systematic: systemd sets `$PATH` with both directories for all users and services. So generally all users and programs will encounter both sets of binaries. 

It is mentioned that the proposal to unify these directories has several benefits, such as simplify the work of maintainers of packages by eliminating the need to decide in which directory to put an executable file (for example, in Fedora the ip utility was located in sbin and in Debian in bin; after unification, the Debian characteristic path will work in Fedora).

This will make the system more predictable and understandable for users. and will increase compatibility between different distributions. Additionally, it will simplify searching logs and parsing the output of utilities like strace, reducing operational complexity, plus it will also reduce the number of directory checks when running execvp() and similar calls.

The unification also aligns with the practice of Arch Linux, which merged sbin and bin in 2013, and has the potential to make Fedora more compatible with other distributions. Removing the reference to the /usr/sbin directory from the PATH environment variable once all executable files are consolidated in one place is integral to this proposal.

Although the proposal is still under discussion and has not been reviewed by the FESCo (Fedora Steering and Engineering Committee), which is responsible for the technical part of the development of the Fedora distribution, the unification of bin and sbin seems to have significant advantages in terms of simplicity, predictability and compatibility, so it is possible that this proposal becomes one of the changes that we will find in Fedora 40.

Finally, if you are interested in knowing more about it, you can check the details in the following link


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.