Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  How-Tos  >  Ubuntu/Debian Bash: Mail: command not found (CentOS, Redhat)
Top Scroll

Ubuntu/Debian Bash: Mail: command not found (CentOS, Redhat)

 2 min

You are unable to see most of the commands in your system with the minimal installation of any Linux distro. Only the necessary packages are installed for running an operating system and skipped unnecessary packages. The mail command is used in most of the Linux distribution for sending emails from the command line. You may get the error such as ‘The program mail is currently not installed.’ in most of the Debian based systems.

Install mail Command:

Let’s use one of the following commands to install the mail command according to your operating system. For RHEL based OS, this command installed from mailx rpm packages.

Install mail command on CentOS/Redhat 7/6/5:

yum install mailx

 

Install mail command on Fedora 22+:

dnf install mailx

 

Install mail command on Ubuntu/Debian/LinuxMint:

On Debian based operating system this command found in mailutils package.

sudo apt-get install mailutils

 

Sending Test Email

Send a test email using the following command after installing mail command packages in your system.

echo “Hello World” | mail -s “Message Subject” receiver@example.com
For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.