Sample Header Ad - 728x90

Should the use of /etc/mtab now be considered deprecated?

8 votes
2 answers
1614 views
I'm curious about the file or symlink /etc/mtab. I believe this is a legacy mechanism . On every modern linux I've used this is a symbolic link to /proc/mounts and if mtab were to be a regular file on a "normal" file system /etc there would be challenges in making software work with mount namespaces. For a long time I'd presumed that one of two things were true. Either: - We're waiting for software referencing /etc/mtab to age out or be updated - Other non-linux OS still use the same file name and the link is there for cross platform compliance However both of these seem shaky ideas. I can't find good reference to any modern OS keeping the same file name outside Linux. And it seems to have lived for much too long to be simply a backward compatibility issue; far more significant changes seem to have come and gone in that same time. So I'm left wondering if /etc/mtab is really just there for historic reasons. Is it in any way officially deprecated? Is there any solid **modern** reason [as of 2023] to keep it? *I don't want to delete it from my system, but as a software developer I'd like to understand its usefulness and whether to avoid it.*
Asked by Philip Couling (20391 rep)
Apr 16, 2023, 09:40 AM
Last activity: Apr 16, 2023, 07:09 PM