On UNIX, the boot code is traditionally found in the directory /usr/mdec. Some modern UNIX variants keep this tradition up (e.g. OpenBSD) while others have changed the directory layout (e.g. FreeBSD). I was able to find a /usr/mdec directory in 5th edition UNIX, but not in any of the incomplete earlier versions. No explanation for the name is given.

Where does the name /usr/mdec come from and what does it mean?

  • 2
    I suspect the dec part was chosen because the code is DEC-specific... – Stephen Kitt Jul 31 '18 at 13:22
  • 2
    There are also references to mdec in V4. – Stephen Kitt Jul 31 '18 at 13:31
  • 3
    I suspect it to mean DEC as well - the directory contains DEC machine specific boot code – tofro Jul 31 '18 at 14:01

These directories have such terse names, don't they? And the etymology is not always documented, nor obvious. In many cases, the etymology of a name in UNIX is simply lost to obscurity.

But the directory you're asking about appears to contain images for magtapes and DECtapes, at least to begin with, or in the earliest versions of UNIX. From the manpage linked to by Stephen Kitt,

The tp command places a bootstrap program on the otherwise unused block zero of the tape. The DECtape version of this program is called tboot, the magtape version mboot.

There also is mention of a /usr/mdec/uboot, which is a bootstrap of the filesystem. I don't know whether that was a magtape or a DECtape.


Remember that the concept of a /home subtree was introduced later. /usr in antique unices was literally the user homes tree for both system and wetware user accounts, so whatever the system user account "mdec" needed to store, it stored there. We still have a "bin" user on some unices today, that's where the "/usr/bin" convention is from...

  • 2
    Doesn't seem to address the question which is really asking about the meaning of "mdec". We can assume the OP knows about the "usr" part. – another-dave Aug 16 at 2:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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