Run a shell script on boot in ubuntu [closed]

别等时光非礼了梦想. 提交于 2019-12-25 20:40:22

问题


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.



来源:https://stackoverflow.com/questions/15901280/run-a-shell-script-on-boot-in-ubuntu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!