The contents of /etc/motd are displayed by login(1) after a suc‐
cessful login but just before it executes the login shell.
The abbreviation "motd" stands for "message of the day", and this
file has been traditionally used for exactly that (it requires
much less disk space than mail to all users).
可见,motd并不执行指令只是在shell运行之前将内容显示在终端。
motd经常用于ssh登录后对用户的提醒、显示ASCII Art等
Linux的欢迎语存放在/etc/issue 和 /etc/motd两个文本文件当中。/etc/issue存放的是linux登录前的提示语;
/etc/motd存放的是linux登录后的提示语。
直接使用文本编辑器修改即可
用法示例:
$ sudo nano /etc/motd
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)