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:
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:
You can run a script which changes the file contents by your desire to add some dynamism if you want.