You are currently viewing How to set Message of the Day (MOTD) in Linux

How to set Message of the Day (MOTD) in Linux

In Linux systems, creating a personalized user experience enhances user satisfaction. One way to achieve this is by creating or customizing the welcome message displayed when a user login or launches the terminal. By editing the default MOTD with tailored content, you can pass on some important information. In this guide, we cover how to set up a custom Linux welcome message, also known as “message of the day”.

Customizing Linux Welcome Message: message of the day

What is MOTD?

Message of the day (MOTD) is a file named motd in Linux and its content. The content is displayed to the user on ssh login. This serves as a platform to put across important announcements, warnings, system update information, and any other message that system admins would want to put across. Usually, there exists a default text on Linux machines that will be displayed when the terminal is launched, or for Linux servers, this is the message that you get on successful SSH access.

How to customize MOTD

To edit the message of the day file, you can use any of the available text editors. The popular file editors in Linux are Vim and Nano. The file is found in this location: /etc/motd

  • Access the server on ssh and run the command.
sudo nano /etc/motd
  • Enter your custom welcome as preferred and save. The nature of the message could be greetings, instructions, system updates, or any other important piece of information.
  • You can include styling to the information you are sharing such as headers, bullet points, and italicized text.
  • The MOTD needs to be checked on a routine basis, as during updates; it may be overwritten by the system’s default.

How to Make Ascii Art or 3-d MOTD

There are several online platforms to generate a 3-d MOTD. One of the popular ones is ASCII Generator. Here, you are given a variety of fonts that turn plain text into amazing 3-d text art, which improves the visual experience of your MOTD.

How to disable message of the day from running

After some time, you may decide to do away with the custom MOTD. This could be disabling it temporarily or permanently. To permanently remove the custom MOTD, you can echo an empty string to the motd file or manually delete the content of this file. This will remove the content of this file. See the command.

echo '' > /etc/motd

To temporarily suspend the day’s message from showing, create a .hushlogin file on the homepage. To re-enable it when disabled using this method, delete the file. See the commands below:

touch ~/.hushlogin      #to templorarily disable message of the day
rm -f ~/.hushlogin      #to renable message of the day.

Web Hosting and email hosting Packages

For web development services, SEO services, Digital marketing strategies, website set up services, web hosting and domain registration; contact Dynamic Technologies.

Related Content: