80

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

uloBasEI
  • 3,047

3 Answers3

99

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.)

tshepang
  • 65,642
  • 23
    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
  • Then why not use unmt? Sounds easier to remember. – JMCF125 Sep 02 '13 at 17:46
  • 2
    Maybe it is because of the Greek οὐ suffix, which means "not", that would also explain urandom – Anthony Garcia Jun 02 '16 at 14:04
  • Filenames and filename length limits actually have nothing whatsoever to do with this (and besides on early unix the limit was 14 characters). – Greg A. Woods Mar 04 '17 at 02:08
  • @GregA.Woods Unix v1 did have an 8-character limit, the 14-character limit came a little later and then stayed for a while. – Gilles 'SO- stop being evil' Mar 04 '17 at 11:44
  • Well, since nothing before the 4th Edition had a kernel written in C, I'm not sure you can really rely on any pre-V4 naming conventions or limits within those earlier versions that might influence them either, though there was clearly some carry-over in syscall names. In any case this has nothing whatsoever to do with filename lengths and everything to do with external identifiers stored in symbol tables and used in tools like assemblers and linkers (some of which would not have been the Unix implementations). – Greg A. Woods Mar 05 '17 at 20:43
  • I will forever use whooping rather than whopping ;) Please don't edit that. – Kenny Nov 17 '23 at 20:02
12

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

philfr
  • 1,088
  • 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 02:50
  • I'm guessing by that time it was tradition to truncate letters if you could. – Shadur-don't-feed-the-AI Mar 22 '11 at 08:00