Mail vs. mail what is the difference

emailmail-command

What is this business about mail and Mail?
[On a CentOS box] Why mail does not work but won't return an error either while Mail works fine with the exact same syntax?

Mail is basically a link to mail, isn't it?

Sorry, this was a mixup, apparently (for historical reasons?!) there is a mail and a Mail
Nowadays it looks like they both point to the same thing, on my machine:

sr-linux> ls -l `which mail`
-rwxr-xr-x    1 root     mail        66492 Jun 24  2001 /bin/mail
sr-linux> ls -l `which Mail`
lrwxrwxrwx    1 root     root           14 Nov 19  2001 /usr/bin/Mail -> ../../bin/mail

Best Answer

Historically, there have been many incompatible extensions of the original mail commnad. Mail came from BSD, and took the name Mail rather than mail because it was shipped alongside the incompatible mail program. Later the same story happened with mailx. For more details, read the Heirloom project's write-up on the different versions of mail. Linux distributions have variously provided one or more of the mail utilities under various names.

For portability, even between installations of the same Linux distribution sometimes, you can't rely on mail. The mailx command is standardized (not with all the options that might exist on a particular system).

If you want a utility that always behaves in the same way provided it's present, and you don't mind that it's often not installed by default, you can use mutt.

Related Question