Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

When I start the terminal (which uses bash) a echoed message appears several times right before the message "You have mail." and it is added by someone that has used my computer. It also happens when I create a new tab in the terminal.

Now I would like to remove it's appearance, what suggestions do you have?

share|improve this question
up vote 1 down vote accepted

If it only happens for one user account, check the following files:

  • ~/.bash_profile (and any files sourced therein)
  • ~/.bashrc (if it exists)
  • your Terminal preferences: Under the Startup tab, is there a command defined to be run when starting Terminal?
  • your Terminal preferences again: Under the Settings tab, check to see if your selected terminal style/configuration defines a startup command under the tab Shell.

As per the comments to this post:

  • Check /etc/motd to see if a message of the day is defined for login
share|improve this answer
Crediting the users commenting on this question. – Daniel Beck Dec 23 '10 at 21:38
Checked the files /etc/profile, /etc/bashrc (no signs leading to any output) and none of ~/.bash_login, ~/.bash_profile or ~/.profile existed. Also checked the preferences in the Terminal application, but no traces of any script running there either. – Rikard Dec 23 '10 at 21:47
@Rikard Change your shell in Terminal preferences, does the problem go away? Use another terminal application, such as iTerm, does the problem go away then? – Daniel Beck Dec 23 '10 at 21:49
@Joey: As I understand the question, the problem is not the message regarding mail, but something repeatedly echoed before that message. – Daniel Beck Dec 23 '10 at 21:51
Changed the shell in the Terminal preferences and also tried with iTerm, both with the same result as before. – Rikard Dec 23 '10 at 21:56

You can try the following

touch $HOME/.hushlogin

If the message still shows up, it is probably located in one of the bash configuration files. Check those for an echo or print command.

share|improve this answer
The previous question gave a answer to locate where the message came from, but I applied your solution afterwards in order to hide the "You have mail." message. In my case your tip would also have solved the problem. – Rikard Dec 25 '10 at 11:30

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.