1

Simple question. I see the following when I open a new terminal window (iTerm):

Last login: Fri Mar  2 16:52:40 on ttys009

I am working on some desktop automation (terminal shortcuts n such) and want to make that text go away when opening a new virtual terminal in an interactive session. I am using bash as my login shell.

Is this a bash setting? How can I silence this output?

  • It would help if you could explain what you mean by "terminal shortcuts" here, and have you worked out where that output is coming from? Usually these things are in a file like .bashrc or .bash_profile, so it's likely you could just comment out the command ... – Will Crawford Mar 3 '18 at 4:16
2

From man login:

If the file ~/.hushlogin or /etc/hushlogins exists, then a "quiet" login is performed (this disables the checking of mail and the printing of the last login time and message of the day).

Note that if last login is still being shown after carrying out the above, you should investigate PAM as suggested in the man page.

2

If you're working on automation, it should not matter -- that text is not displayed for non-interactive terminals.

  • Workstation automation - I should have been more clear. I do see it. I'll edit post. – datUser Mar 2 '18 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.