Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm receiving "You have mail" messages and according to How to remove “You have mail” welcome message I should read my mail with mail. However I cannot find the command in my system (Ubuntu 10.04 server). What do I need to install?

share|improve this question
up vote 13 down vote accepted

On Debian and derived distributions, you can use the apt-file command to search for a package containing a file. Install apt-file (apt-get install apt-file) and download its database (apt-file update, Ubuntu does it automatically if you're online). Then search for bin/mail:

apt-file -x search 'bin/mail$'

With the command-not-found Install command-not-found package installed, if you type a command that doesn't exist but can be installed from the Ubuntu repositories, you get an informative message:

$ mail
The program 'mail' can be found in the following packages:
 * heirloom-mailx
 * mailutils
Try: sudo apt-get install <selected package>

If you're not after mail specifically, but after any program to read your local mail from the command line, there are much better alternatives. All mail user agents provide the mail-reader virtual package, so browse the list of packages that provide mail-reader and install one or more that looks good to you (and doesn't use a GUI, if it's for a server).

mutt Install mutt's motto is “All mail clients suck. This one just sucks less.”, and I tend to agree, but in the end it's a very personal choice.

share|improve this answer

Just install mailutils which must contain mail:

# apt-get install mailutils

Read more about mail and GNU mailutils here

share|improve this answer

Another program you can use is mutt. I prefer using mutt to mail - it just has a nicer interface in my opinion.

# apt-get install mutt

should work - but I use Fedora not Ubuntu so can't confirm this.

share|improve this answer

You may already have mail installed. If so, you can read your mail by entering mail at the command line.

Welcome to the world of choice. You can use pretty well any mail reader you choose. emacs users can read mail from within their editor.

Install a pop3 or imap server and you can read your mail from your Windows PC, Mac, or other devices.

If you setup a .forward or .procmailrc file then you may be able to forward your mail to another e-mail address and read it from there.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.