Skip to main content

Linux Mail in Terminal

When logging into the terminal and you see the message '"You have mail'mail" youmessage, haveand somewant options:

to
  • Viewdelete the listmail, ofI mail:use
      this:

    • View The Mail
      cat /var/spool/mail/rootmail
      Delete The Mail

      (changeChange root to the username you wannawant check)

    • to
    delete
  • mail
  • Deletefor)

    the mail:
    • > /var/mail/root
      (this
      Common willUsernames
      delete

      These all messages for root - leaveare the greater than symbol)

Leave the > symbol when executing the delete command! You are in effect redirecting the output of nothing to the file, which will truncate it

Commontwo usernames that I will havesee mail:mail for, usually:

  • root
  • www-data