vorfee's Tech Blog

Just another tech blog

ターミナル1行目の「Last login:」表示を消す

ターミナルを起動した時、ログインシェルの1行目に表示されるLast loginの表示がある。

Last login: Mon Feb 23 00:10:48 on ttys000

表示を消すにはホームディレクトリに空の.hushloginファイルを作る。

touch ~/.hushlogin

逆に、表示したいときはホームディレクトリにある.hushlogin ファイルを消す。

rm ~/.hushlogin