Network
The mail command
Sends an email from the command line (with -s the subject).
Most useful options
-sMessage subjectCopy-ready examples
$ sudo systemctl start postfixStart the mail server$ mail -s "Hola" alumnoSend an email$ cat /var/mail/alumnoRead the mailboxYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- If postfix is not active, mail warns that the mail system is not running.
FAQ
What does mail do?
It sends mail from the command line and reads local mailboxes.
How do I send a message?
mail -s subject recipient; then type the body.
More Network commands
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course