Run a shell script on boot in ubuntu [closed]

2019-09-22 09:07发布

问题:

I've done a shell that print on therminal: "Welcome Davide, have a nice day". This script i want that start on boot. I've tryed to put it everywhere but nothing . The folders i put it are: rc6.d and rc0.d. Then i wrote the whole script in rc.local but nothing happen..

回答1:

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.



标签: shell boot