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
What ever happened to editing config files?
@daybringer: sorry, I can’t understand what you mean with this
Ah, if you’re talking about the “>” it’s a bashism. You can use “$ touch ~/.hushlogin” if you prefer
“>” 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”
It’s a bit weird that login(1) mentions it but motd(5) does not, if you ask me.
@Elias: I guess it’s because it’s login asking for a motd, not motd imposing itself to login.
Yes!!! It Works!
Many Thanks Brother!!
You Saved My Day!!!
Thank you. Worked great on RHEL 6.3.