6 Easy Steps to Install Mutt Command in Linux (RHEL/CentOS 7/8)

In this article, I will take you through 6 Easy Steps to Install Mutt Command in Linux (RHEL/CentOS 7/8). If you are using Linux OS in your Organization then you might have faced a situation where you need send an email from Linux command line once a task is completed or might due to some other requirements. For such situations you can always use a simple Linux mutt tool to send an email from Command Line. This tool is an open source tool and is fairly easy to install in Linux based Systems. I will go through the detailed steps to install this tool in your Linux System.

6 Easy Steps to Install Mutt Command in Linux (RHEL/CentOS 7/8) 1

Easy Steps to Install Mutt Command in Linux (RHEL/CentOS 7/8)

Also Read: 11 Useful LVM(lvcreate, pvcreate and vgcreate) command examples on Linux

Step 1: Prerequisites

a)You need to have running RHEL/CentOS 7/8 based Systems.

b)You should have yum tool installed in your System. Please Check Top 22 YUM Command Examples in RedHat/CentOS 7 to know more about yum utility.

c)You should have root or sudo access to run Privileged Commands. Please Check How to Add User to Sudoers to know more about providing sudo access to the User.

Step 2: Update Your System

If you are going to or planning to install a new package in your System then the first thing you need to do is to update your System using yum update -y command as shown below. This will update all the installed packages with the latest version so that all the dependent packages will remain fully updated.

[root@localhost ~]# yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: download.nus.edu.sg
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
Resolving Dependencies
--> Running transaction check
---> Package ca-certificates.noarch 0:2019.2.32-76.el7_7 will be updated
---> Package ca-certificates.noarch 0:2020.2.41-70.0.el7_8 will be an update
---> Package curl.x86_64 0:7.29.0-57.el7 will be updated
---> Package curl.x86_64 0:7.29.0-57.el7_8.1 will be an update
---> Package dbus.x86_64 1:1.10.24-13.el7_6 will be updated
---> Package dbus.x86_64 1:1.10.24-14.el7_8 will be an update
---> Package dbus-libs.x86_64 1:1.10.24-13.el7_6 install mutt will be updated
---> Package dbus-libs.x86_64 1:1.10.24-14.el7_8 install mutt will be an update
---> Package grub2.x86_64 1:2.02-0.81.el7.centos install mutt will be updated
---> Package grub2.x86_64 1:2.02-0.86.el7.centos will be an update
---> Package grub2-common.noarch 1:2.02-0.81.el7.centos will be updated
---> Package grub2-common.noarch 1:2.02-0.86.el7.centos will be an update
---> Package grub2-pc.x86_64 1:2.02-0.81.el7.centos install mutt will be updated
---> Package grub2-pc.x86_64 1:2.02-0.86.el7.centos install mutt will be an update
---> Package grub2-pc-modules.noarch 1:2.02-0.81.el7.centos will be updated
---> Package grub2-pc-modules.noarch 1:2.02-0.86.el7.centos will be an update
---> Package grub2-tools.x86_64 1:2.02-0.81.el7.centos will be updated
---> Package grub2-tools.x86_64 1:2.02-0.86.el7.centos will be an update
---> Package grub2-tools-extra.x86_64 1:2.02-0.81.el7.centos will be updated
---> Package grub2-tools-extra.x86_64 1:2.02-0.86.el7.centos will be an update
---> Package grub2-tools-minimal.x86_64 1:2.02-0.81.el7.centos will be updated
---> Package grub2-tools-minimal.x86_64 1:2.02-0.86.el7.centos will be an update
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.252.b09-2.el7_8 will be updated
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.262.b10-0.el7_8 will be an update
---> Package java-1.8.0-openjdk-accessibility.x86_64 1:1.8.0.252.b09-2.el7_8 will be updated
---> Package java-1.8.0-openjdk-accessibility.x86_64 1:1.8.0.262.b10-0.el7_8 will be an update

Step 3: Install Mutt Command in Linux

Once your System is fully updated with the latest version then you can install mutt command in Linux using yum install mutt -y command as shown below.

Advertisements
[root@localhost ~]# yum install mutt -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: download.nus.edu.sg
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
Resolving Dependencies
--> Running transaction check
---> Package mutt.x86_64 5:1.5.21-29.el7 will be installed
--> Processing Dependency: urlview for package: 5:mutt-1.5.21-29.el7.x86_64
--> Processing Dependency: libtokyocabinet.so.9()(64bit) for package: 5:mutt-1.5.21-29.el7.x86_64
--> Running transaction check
---> Package tokyocabinet.x86_64 0:1.4.48-3.el7 will be installed
---> Package urlview.x86_64 0:0.9-15.20121210git6cfcad.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
mutt x86_64 5:1.5.21-29.el7 base 1.4 M
Installing for dependencies:
tokyocabinet x86_64 1.4.48-3.el7 base 459 k
urlview x86_64 0.9-15.20121210git6cfcad.el7 base 27 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package (+2 Dependent packages)

Total download size: 1.9 M
Installed size: 7.2 M
Downloading packages:
(1/3): tokyocabinet-1.4.48-3.el7.x86_64.rpm | 459 kB 00:00:00
(2/3): urlview-0.9-15.20121210git6cfcad.el7.x86_64.rpm | 27 kB 00:00:00
(3/3): mutt-1.5.21-29.el7.x86_64.rpm | 1.4 MB 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.3 MB/s | 1.9 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : tokyocabinet-1.4.48-3.el7.x86_64 1/3
Installing : urlview-0.9-15.20121210git6cfcad.el7.x86_64 2/3
Installing : 5:mutt-1.5.21-29.el7.x86_64 3/3
Verifying : urlview-0.9-15.20121210git6cfcad.el7.x86_64 1/3
Verifying : tokyocabinet-1.4.48-3.el7.x86_64 2/3
Verifying : 5:mutt-1.5.21-29.el7.x86_64 3/3

Installed:
mutt.x86_64 5:1.5.21-29.el7

Dependency Installed:
tokyocabinet.x86_64 0:1.4.48-3.el7 urlview.x86_64 0:0.9-15.20121210git6cfcad.el7

Complete!

Step 4: Check Mutt Command Version

If you want to check Mutt Command version then you need to use mutt -v command as shown below. As you can see from below output, current installed mutt version is 1.5.21.

[root@localhost ~]# mutt -v
Mutt 1.5.21 (2010-09-15)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 3.10.0-1127.10.1.el7.x86_64 (x86_64)
ncurses: ncurses 5.9.20130511 (compiled with 5.9)
libidn: 1.28 (compiled with 1.28)
hcache backend: tokyocabinet 1.4.48

Step 5: Send Mail using mutt command in Linux

If you want to send mail using mutt command in Linux then you can use below command. Here we are sending an email to User example@cyberithub.com with subject "Test Email" and message body "This is from CyberITHub".

[root@localhost ~]# echo "This is from CyberITHub" | mutt -s "Test Email" example@cyberithub.com

-s : Specify the subject of the message. More can be checked on Mutt Command Man Page.

Step 6: Check all the options of Mutt Command in Linux

If you want to check all the options available with mutt command in Linux then you need to use mutt -h command as shown below.

[root@localhost ~]# mutt -h
Mutt 1.5.21 (2010-09-15)
usage: mutt [<options>] [-z] [-f <file> | -yZ]
mutt [<options>] [-x] [-Hi <file>] [-s <subj>] [-bc <addr>] [-a <file> [...] --] <addr> [...]
mutt [<options>] [-x] [-s <subj>] [-bc <addr>] [-a <file> [...] --] <addr> [...] < message
mutt [<options>] -p
mutt [<options>] -A <alias> [...]
mutt [<options>] -Q <query> [...]
mutt [<options>] -D
mutt -v[v]

options:
-A <alias> expand the given alias
-a <file> [...] -- attach file(s) to the message
the list of files must be terminated with the "--" sequence
-b <address> specify a blind carbon-copy (BCC) address
-c <address> specify a carbon-copy (CC) address
-D print the value of all variables to stdout install mutt
-e <command> specify a command to be executed after initialization
-f <file> specify which mailbox to read
-F <file> specify an alternate muttrc file

 

 

Popular Recommendations:-

10 Popular nfsstat command examples in Linux for Professionals (cheatsheet)

10 Useful nfsstat and nfsiostat examples to troubleshoot NFS Performance in Linux

Understanding Kafka Console Producer and Consumer in 10 Easy Steps

Popular Apache Kafka Architecture Explained Using 4 Basic Components

17 Useful Apache Kafka Examples on Linux (RedHat/CentOS 7/8)

How to Install Apache Kafka on Ubuntu 18.04

How to Install Apache Zookeeper on Ubuntu 18.04

Tutorial: How to do Elasticsearch Backup and Restore (v7.5)

Advertisements

Leave a Reply