If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!
The abbreviation “motd” stands for “message of the day”, and this file has been traditionally used for exactly that (it requires much less disk space than mail to all users).
If you want to change this message in ubuntu server follow this procedure first you need to edit /etc/motd.tail file
sudo vi /etc/motd.tail
Enter your message save and exit the file
Now you can restart your ubuntu server to check your changes are working or not
For Ubuntu Intrepid Users
There is a new package that provides this functionality with more options, called update-motd, available in Ubuntu Universe for Intrepid.
Install update-motd in Ubuntu Intrepid
sudo aptitude install update-motd
This will complete the installation
This package seeks to make the /etc/motd (Message of the Day) more dynamic and valuable, by providing a simple, clean framework for defining scripts whose output will regularly be written to /etc/motd.
The update-motd package creates a directory, /etc/update-motd.d, and installs a cronjob, /etc/cron.d/update-motd, which calls /usr/sbin/update-motd every 10 minutes (by default).
/usr/sbin/update-motd uses run-parts to execute each script in /etc/update-motd.d in lexigraphic order, concatenating the results with the message-of-the-day header, /etc/motd.tail.
In this way, users, or even other packages can drop scripts into /etc/update-motd.d to affect the MOTD.
Example
create a script, such as /etc/update-motd.d/10-stats
sudo vi /etc/update-motd.d/10-stats
add the following lines and save the file.
#!/bin/sh
echo
date
echo
who
echo
Make sure you chmod +x /etc/update-motd.d/10-stats.Then, you can either run /usr/bin/update-motd, or uptimeWait ~10 minutes and then log in.
This is very simple and great idea where you can see whatever information you want when you login in to your server.




I think you will find that /etc/motd is only displayed on text-logins, not GUI ones (on what used to be init level 3, if that helps explain anything).
So -- unless I’m mistaken -- the vast majority of us don’t see that text.
@shadowfirebird
You can see this MOTD message if you are logging using ssh,telnet etc
Granted. But, it depends on the telnet/ssh server. Some do, some don’t.
The contents of /etc/motd are displayed by login after a successful login but just before it executes the login shell.
it depends on the telnet/ssh server. Some do, some don’t
Not really.I have been using debian,ubuntu,redhat linux servers everytime when you login using ssh or telnet you should see similar to the following message
Linux t61p 2.6.26-5-generic #1 SMP Fri Aug 15 13:54:22 UTC 2008 x86_64
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
If you want an easy way to silence motd for a single user, run touch ~/.hushlogin. Personally, I find motd annoying.
I find operating systems that don’t follow age-old conventions annoying.
LOL
P.S. Thanks for the article! Interesting and actual as I’ve been just searching for this howto.
1.vi /etc/motd.tail
2.cat /etc/motd.tail > /var/run/motd