bsd-mailx command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
bsd-mailx: command not found
or when using sudo you get the following error message
sudo: bsd-mailx: command not found
Solutions to bsd-mailx: command not found
How To Fix bsd-mailx: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu bsd-mailx is provided by bsd-mailx package.
bsd-mailx is:
bsd-mailx is the traditional simple command-line-mode mail user agent. Even if you don’t use it, it may be required by other programs.
The /usr/bin/mail command provided by this package is a very simple one, and does not include many features that can be found in more advanced mail user agents.
For example bsd-mailx DOES NOT support:
- MIME (i.e. no attachments, no UTF-8 or other charsets support);
- SMTP protocol (/usr/sbin/sendmail interface only is used);
- POP3/IMAP (bsd-mailx reads local mailboxes only);
- maildir format (traditional mbox only format is supported).
If the above features are needed, please consider installing another package providing similar /usr/bin/mail interface:
- s-nail package,
- or mailutils package.
To fix this problem, we can install more using the command below.
sudo apt-get -y install bsd-mailx
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install bsd-mailx.
sudo apt -y install bsd-mailx
Or if you have aptitude installed you can use the following command.
sudo aptitude install bsd-mailx
Summary
In this tutorial we learn how to fix bsd-mailx command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.