64

I am wondering if there is any historical or practical reason why the umount command is not unmount.

79

This dates all the way back to the very first edition of Unix, where all the standard file names were only at most 6 characters long (think passwd), even though this version supported a whooping 8 characters in a file name. Most commands had an associated source file ending in .c (e.g. umount.c), which left only 6 characters for the base name.

A 6-character limitation might also have been a holdover from an earlier development version, or inherited from a then-current IBM system that did have a 6-character limitation. (Early C implementations had a 6-character limit on identifiers — longer identifiers were accepted but the compiler only looked at the first 6 characters, so foobar1 and foobar2 were the same variable.)

(I thought I remembered a umount man page that listed the spelling as a bug of unknown origin, but I can't find it now.)

  • 21
    6 character command name + .c (or .s) extension = 8 character filename limit. – geekosaur Mar 21 '11 at 21:25
  • @geekosaur: Ah, right, the source file. If you write an answer, I'll delete mine. – Gilles 'SO- stop being evil' Mar 21 '11 at 21:37
  • 5
    Enh, just annotate it if you want. – geekosaur Mar 21 '11 at 21:38
  • @geekosaur: I thought of the man page, as well, but V1 didn't have a man command (and one of the man pages is called directory, which wouldn't have fit yet). So I wonder why passwd was truncated to 6 characters (there wasn't a passwd command yet either, just /etc/passwd). – Gilles 'SO- stop being evil' Mar 21 '11 at 22:52
  • 2
    Maybe it is because of the Greek οὐ suffix, which means "not", that would also explain urandom – Anthony Garcia Jun 2 '16 at 14:04
8

It seems there's been some mis-information sitting here for a while now.

The most likely reason for the umount command having the abbreviated name is because it follows from the name of the system call which it uses: umount().

The probable reason the "unmount" system call having the name umount() is because early linkers limited the length of external identifiers to as few as 6 characters (of just one case) on some types of systems (and it made sense to maintain compatibility with such tools at the time), and "umount" is a logical form of abbreviation for "unmount". See page 179 of the first edition of The C Programming Language for a list of the external identifier characteristics of various systems of interest at the time of publication.

Note also that early C compilers treated the first 8 characters of an identifier as significant, but allowed identifiers to be longer. (K&R page 33)

Note that the length of identifiers in symbol tables has nothing whatsoever to do directly with filename length, at least not within Unix (Unix symbol tables, since V1, have 8 characters for identifiers, though it is noted in the V1 manual that the assembler "generates symbols of at most 7 bytes").

-1

For the same reason the creat system call is not spelled create ?

https://stackoverflow.com/questions/1713457/what-did-ken-thompson-mean-when-he-said-id-spell-create-with-an-e

  • 4
    Nope. The regret in the quote you reference is because they could have added the 'e' even in spite of the 6 character limit being argued over in the other answer. There really is no good reason for it to be truncated, unlike with umount. – Warren Young Mar 22 '11 at 2:50
  • I'm guessing by that time it was tradition to truncate letters if you could. – Shadur Mar 22 '11 at 8:00

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.