/

如何從 shell 中刪除「Last login..」訊息

如何從 shell 中刪除「Last login..」訊息

每次打開我的 shell 都會出現這樣一行訊息:
Before

對我來說是一個沒有用的資訊。
我想要把它刪除。

我執行了以下指令以刪除「Last login: ….」的資訊:

1
touch ~/.hushlogin

完成!

After

這個方法適用於 macOS 和 Linux。

tags: [“shell”, “command line”, “login message”, “terminal”]