Disable “You have new mail” terminal message

By default in linux you get a message saying something like

You have new mail in

when you log into a linux machine.

Sometimes this gets annoying because you always have new mail, or because there seems to be a delay while checking the mail or because the mail is actually stored on some kind of remote disk.

Disabling this setting is easy. Simply include

unset MAILCHECK

in your .bashrc file (for login shell) or .bash_profile (for non-login shells, i.e. ssh) and the message shouldn’t appear.

For me it speeds up login for my linux server and removes clutter.
I got this from:

http://www.savarese.org/patches/bash.html

There is also a more detailed explanation that I found here:

http://www.cygwin.com/ml/cygwin/1998-08/msg00365.html

This page explans the difference between .bashrc and .bash_profile:

http://joshstaiger.org/archives/2005/07/bash_profile_vs.html

This entry was posted in Linux and tagged , , , . Bookmark the permalink.

One Response to Disable “You have new mail” terminal message

  1. Paul Maddox says:

    Very useful, thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>