How to Display the Message of the Day to Shell Users

A “Message of the Day” or MOTD is a statement, usually brief, that your users see when they login to your server via the shell. You can use it for any number of reasons, such as to announce a new server feature, remind users about your policies, display important network information, or even use the opportunity to display a random quote or joke. Furthermore, you can use it for more than one of these or other reasons.

Changing the MOTD on your dedicated server is rather easy to do. Simply edit the file found at /etc/motd. By default, some Linux server distributions will leave it empty. Others may fill it with automatic information about the kernel and distribution. Either way, you can edit it to read whatever you want.

The MOTD file is a standard text file, which means that you can enter in any information you want. As a general guideline, you should make sure your text does not fill up more than a single screen. Otherwise, users may miss part of your message.

Once the message of the day is setup, you may not have a reason to change it again, especially if you are just using it to display a legal disclaimer about your server, something that you may want to consider due to the Computer Misuse Act of 1990. On the other hand, if you use it for announcements, such as scheduled upgrades or disk space reminders, you may find yourself updating it regularly.