How to add the mail command in CentOS and Fedora

I was surprised to find that the mail command doesn’t work out of the box in Fedora, nor in the minimal installation of CentOS 7. Thankfully there’s an easy way to add it by installing the mailx package.

yum install mailx

That’s not the full story on how to send email from the command line of course, nor is it the only possible way to do so. I might elaborate on these details in a future article. I just wanted to make a note to remind myself of the package name that I keep forgetting.

Further Reading

Jay is founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or drawing on tablet devices. He blogs about his coding journey at and

You can leave a comment on my original post.