2015-03-26 11:28:08 +00:00
|
|
|
+++
|
|
|
|
date = "2010-11-25"
|
|
|
|
title = "Hide 'Last login:' on bash login"
|
|
|
|
tags = ["BASH", "MacOSX"]
|
|
|
|
slug = "hide-last-login-on-bash-login"
|
|
|
|
+++
|
|
|
|
Everytime I open a new Terminal on my Mac, I get a line like this:
|
|
|
|
|
2017-03-20 15:35:19 +00:00
|
|
|
``` text
|
|
|
|
Last login: Thu Nov 25 09:07:55 on ttys004
|
|
|
|
```
|
2015-03-26 11:28:08 +00:00
|
|
|
|
|
|
|
This annoys me. I don't care when I last opened a local Terminal.
|
2017-03-20 15:35:19 +00:00
|
|
|
|
2015-03-26 11:28:08 +00:00
|
|
|
To hide this "Last login" message when logging in to bash you need to create a file in your homedirectory.
|
|
|
|
|
2017-03-20 15:35:19 +00:00
|
|
|
``` shell
|
|
|
|
touch ~/.hushlogin
|
|
|
|
```
|
2015-03-26 11:28:08 +00:00
|
|
|
|
|
|
|
With this `.hushlogin` file in place you won't see the "Last login" message and go directly to your prompt, where you want to be.
|
|
|
|
|
|
|
|
|