What's the difference between 'hier(7)' and 'file-hierarchy(7)' man pages?
The hier
manual page has a long history that dates back to Unix Seventh Edition in 1979. The one in Linux operating systems is not the original Unix one, but a clone.
At the turn of the century, FreeBSD people documented existing long-standing practice, namely that system administrators adjust stuff for their own systems, and that a good system administrator changes that manual page to match the local adjustments.
Of course, Linux operating systems are notoriously bad when it comes to doco. The hier
manual page is rarely fully adjusted to the actual operating system by the distribution maintainers, if it is adjusted at all. Debian, for example, does not patch it at all, and simply provides the underlying generic hier
manual page from Michael Kerrisk's Linux Manpages Project as-is.
(The BSDs have a generally much stronger tradition of the people who are making changes to the operating system including changes to its doco in what they do. Their doco is better as a result. But it is itself still woefully outdated in some areas. For example: The FreeBSD manual for the ul
command has been missing large parts of the tool since 2.9BSD.)
So Lennart Poettering wrote his own manual page for systemd, file-hierarchy
, in 2014. As you can see, despite its claim it really is not "more minimal" than the hier
page. For starters, it documents a whole load of additional things about user home directories.
Thus there are two different manual pages from two different sets of people, none of whom are the distribution maintainers themselves, who actually decide this stuff.
The simple truth is that real Linux-based operating systems adhere to neither. There are distribution variations from vanilla systemd that don't get patched into the file-hierarchy
page by the distribution maintainers; and as mentioned the hier
page often does not get locally patched either.
They do not adhere to the Linux Filesystem Hierarchy Standard moreover. Several operating systems purposefully deviate from it, and a few of them document this. A few Linux operating systems intentionally do not reference it at all, such as GoboLinux. As you can see from the further reading, Arch Linux used to reference it but has since dropped it.
(I have a strong suspicion, albeit that I have done no rigorous survey, that Arch Linux dropping the FHS is the tipping point, and that adherence to the FHS is the exception rather than the norm for Linux operating systems now.)
For many Linux operating systems there simply is not a single manual page for this. The actual operating system will be an admixture of hier
, file-hierarchy
, the Linux Filesystem Hierarchy Standard, and individual operating system norms with varying degrees of documentation.
Further reading
- Jonathan de Boyne Pollard (2016). "Gazetteer". nosh Guide. Softwares.
- Binh Nguyen (2004-07-30). Linux Filesystem Hierarchy. Version 0.65. The Linux Documentation Project.
- https://wiki.archlinux.org/index.php/Frequently_asked_questions#Does_Arch_follow_the_Linux_Foundation.27s_Filesystem_Hierarchy_Standard_.28FHS.29.3F
- https://netarky.com/programming/arch_linux/Arch_Linux_directory_structure.html
- https://wiki.gentoo.org/wiki/Complete_Handbook/Users_and_the_Linux_file_system#Linux_file_system_hierarchy
- https://www.suse.com/support/kb/doc/?id=7004448
- https://sta.li/filesystem/
- Daniel J. Bernstein. The root directory. cr.yp.to.
hier(7)
comes from the man-pages project, and is supposed to reflect the Filesystem Hierarchy Standard.
file-hierarchy(7)
comes from systemd, and
describes a more minimal, modernized subset of these specifications that defines more strictly the suggestions and restrictions systemd makes on the file system hierarchy.
In particular, the latter describes each file system’s use and constraints in more detail: whether it is local to the host or can be shared, whether it is persistent or can be tmpfs
-backed, how programs are supposed to find it, etc.
Real Linux systems each have their own file system policy, typically closely based on the FHS. For example, Debian’s policy is based on version 3.0 of the FHS, with a number of exceptions. Distributions which use systemd (which includes most non-embedded distributions now) end up following the systemd requirements in practice.