All you need to do is type mail username and type your message.
For instance, suppose I wanted to send mail to a user named sam:
The mail program is very simple. Like cat, it accepts input from standard input, one line at a time, until it gets the end-of-text character on a line by itself: . So, to send my message off I had to hit return and then .
mail is the quickest way to send mail, and is quite useful when used with pipes and redirection. For instance, if I wanted to mail the file report1 to ``Sam'', I could mail sam < report1, or I could have even run ``sort report1 | mail sam''.
However, the downside of using mail to send mail means a very crude editor. You can't change a line once you've hit return! So, I recommend you send mail (when not using a pipe or redirection) is with Emacs's mail mode. It's covered in Section .