Mail command in linux

The mail command in Linux is a utility that allows you to send and receive email messages. Here are some basic usage examples:

Sending an email

To send an email using the mail command, you can use the following syntax:

mail -s "Subject" [email protected]

Replace Subject with the subject of the email and [email protected] with the email address of the recipient.

You will then be prompted to enter the body of the email. You can type in the message and press Enter to send it.

Receiving email

To receive email using the mail command, you can use the following syntax:

mail

This will display a list of your email messages. You can then use the following commands to manage your email:

Other options

Here are some other options you can use with the mail command:

Examples

Here are some examples of using the mail command:

Note: The mail command is a simple email client and does not support all the features of a full-fledged email client like Gmail or Outlook.