Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我做了一个shell,在therminal上打印:“Welcome Davide,祝你有美好的一天”。我希望这个脚本在启动时启动。我试图把它放在任何地方,但什么也没有。我放的文件夹是:rc6.d 和 rc0.d。然后我在 rc.local 中编写了整个脚本,但什么也没发生..
可能您希望它在登录时运行。放进去.bashrc
.bashrc
如果您想在登录 tty0-tty6 之前看到它,请在/etc/issue.
/etc/issue
[fedorqui 的补充]:如果您希望它在登录后显示在 tty0-6 上,请将其放入/etc/motd. 从 ssh 运行时,这不会显示。
/etc/motd