rotating motd

Robert Storey y2kbug at
Fri May 30 20:02:54 PDT 2003

> A trivial question, but a question nonetheless!  My FreeBSD /etc/motd is
> a static and rather boring file.  I recall that when I used to login to
> my Slackware machine, it spruced things up a bit by offering some sort
> of rotating motd, which would spit out a random quote or joke instead of
> the same ol' static message.  Is there a way to simulate this in
> FreeBSD? Unfortunately, 'man motd' does little more than state the
> obvious, and describe a method by which to surpress the motd altogether.
> This, of course, occurs to me as I ssh into my home machine from work!
> Thanks,
> ~John

As Adam pointed out, "fortune" is what you want. I assume it's available
for FBSD (can't check right now as I'm at a Linux box). I don't think you
can run fortune from /etc/motd file. Install the one word command
"fortune" in the run command file for whatever shell you are using. Since
I use bash, that's file .bashrc. This will cause fortune to give you a
message every time you log in, including every time you open an Xterm. It
might drive you crazy after awhile.


More information about the freebsd-questions mailing list