Remove the “Last login” message from the Terminal

Jun 22, 2010 - 2 Comments

When you launch a new Terminal window or tab in Mac OS X you’ll be greeted with a screen that looks something like this:
Last login: Tue Jun 22 10:59:29 on ttys003
Macintosh:~ user$

You can easily get rid of that ‘Last login’ message at the top by entering the following command:
touch .hushlogin
Now when you launch a new terminal you won’t see the message, changes take effect immediately. If you want to reverse this, all you have to do is remove the ‘touched’ .hushlogin file, by entering the following command:
rm .hushlogin

If you want to, you can create a custom MOTD with whatever message you want that will be displayed instead.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Bill Ellis in Command Line, Mac OS X

2 Comments

» Comments RSS Feed

  1. jonathan clairembault says:

    Good trick but you better use:
    touch ~/.hushlogin
    and
    rm ~/.hushlogin

    Cheers

  2. gibatronic says:

    it only works for new windows.
    is there a way to make it work for new tabs too?

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates