Both hier(7)
and file-hierarchy(7)
man pages claim to describe the conventional file system hierarchy. However, there are some differences between them. For example, hier(7)
describes /opt
and /var/crash
, but file-hierarchy(7)
does not. What are the differences between these two descriptions. Which one do real Linux systems use?
Linux Man Pages – Difference Between ‘hier(7)’ and ‘file-hierarchy(7)’
filesystemslinuxman
Related Question
- Shell – Print man pages with fixed width
- Linux – What’s the difference between ioremap and file operation mmap
- How to view differences between the man pages for different versions of the same program
- Install the latest POSIX man pages
- The difference between the mdoc macro set for troff and the plain man macro set for making new manpages
- How to search a pattern containing hyphens inside man pages
Best Answer
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 generichier
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 thehier
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 thehier
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