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

每次打開我的 shell 都會出現這樣一行訊息: 對我來說是一個沒有用的資訊。 我想要把它刪除。 我執行了以下指令以刪除「Last login: ….」的資訊: touch ~/.hushlogin 完成! 這個方法適用於 macOS 和 Linux。