Knowledge Base
MilesWeb / How-Tos, Web Hosting FAQ

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

Approx. read time : 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” [email protected]
With over 8+ years of experience in the digital marketing industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.
Need help? We’re always here for you.