Debian/Ubuntu Linux: bash: mail command not found – Solution

How to Generate random number in Linux

In Linux operating system, the following error may occur when running mail command to access a mailbox, maildir, mail file:

# mail -s 'Test Subject' -r ''
bash: mail: command not found

The above mentioned error means that the mail package is not installed on this server or the mail script is not present on this server. To resolve the issue, install the mailx or mailutils package. The GNU mailutils package contains various utilities for handling mail.

# sudo apt-get install mailutils

You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *