Probably you want it to run at the time of login. Put it in .bashrc
If you want to see it before login to tty0-tty6, put the text “Welcome Davide, have a nice day” in /etc/issue
.
[Adition by fedorqui]: If you want it to be displayed on tty0-6 AFTER login, put it in /etc/motd
. This will not show up when running from ssh.
2
solved Run a shell script on boot in ubuntu [closed]