You may have encounter with mail command not found in Red hat, CentOS, Ubuntu, Debian .Whenever any message says while hitting the command as Command Not Found , it means the package is not installed or script is not present.
Install Mail Command Package
For the mail command not found issue install the mailx. package.Use the below given command for mailx installation.
For Redhat/CentOS =>
yum install mailx
For Debian or Ubuntu =>
sudo apt-get update sudo apt-get install mailutils
You can verify installed package by finding its absolute path. Use the command –