Skip to content
Advertisement

Using crontab in linux to display a message everytime you open terminal?

I want to display message in terminal:

“Welcome!”

when someone opens the terminal

Advertisement

Answer

To print a message when opening a terminal (or logging in via ssh) you should use the message of the day (/etc/motd).

You could use cron to overwrite this file at specific times, and so users will see the current message when they log in:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement