Disable MOTD at login with .hushlogin

If you want to disable the nice Message of the Day (MotD) your sysadmin gently shows you every time you login in your remote shell, then all you have to do is just create a zero-lenght (I mean, empty) file in your $HOME called .hushlogin

> ~/.hushlogin

(you can use touch as well, or any other mean)
That’s all

Advertisement

9 thoughts on “Disable MOTD at login with .hushlogin

    • “>” isn’t a bashism, it is a standard posix redirection operation.
      I’m not sure if the lack of a command before the > is posix standard behaviour, but it works in every shell I’ve tried other than csh. Even with csh, you can avoid using anything other than the shell with the “:” null command, i.e.:
      : > ~/.hushlogin

      • I didn’t mena that “>” is a bashism itself, I meant that using > as a mean to truncat a file (i.e. “> /file/to/truncate”) is a bashism. AFAIK the most standard form would be “cat > /file/to/truncate”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s