Linux Tips & Tricks · December 25, 2021

Linux Message of the Day

[Linux] Give Your Users a Warm Welcome Message!

It’s easy to show a welcome message to users after login in Linux. All you have to is edit the “/etc/motd” file and that’s it.

As name suggests, to show a “Message of the Day” in Linux, you can use “motd” file resides in “/etc” directory. By default, this file is empty:

CentOS 7 login screen with no message of the day
CentOS 7 login screen without welcome message

You can simply echo anything in the file or use your favorite text editor to put some message inside. After you edit the file, all users will see the message you wrote after successfully login. See the example below:

CentOS 7 message of the day
CentOS 7 message of the day

You can run a script which changes the file contents by your desire to add some dynamism if you want.