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


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:


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


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


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

5 Responses to Disable “You have new mail” terminal message

  1. Paul Maddox says:

    Very useful, thanks!

  2. Hasanuzzaman shozib says:


  3. Sasha says:

    A lot of Thank you!

  4. Ryan says:

    How many times you log in your system? Once per day max?
    A 10 characters single line of text per day is what bothers you?
    You receive there important information about what is going on in your system, as cronjobs outputs and others, silencing it is not only pointless but stupid.

  5. Angus Hardie says:

    I disagree that it’s stupid, it’s a choice based on the setup.

    If you have a user account on a system that receives external mail, it’s probable that there is always new mail in the account, so the notification actually tells you nothing.

    This isn’t turning the mail account off, merely the mail notification, which I personally find to be a distraction.

    You must find this indication useful, in which case you should presumably leave it on.

Leave a Reply