RHEL

    1. /etc/issue
    1. /etc/motd
    2. 添加信息
    1. [root@rmaster01 ~]# cat /etc/issue
    2. \S
    3. Kernel \r on an \m
    4. \v \d \l
    5. [root@rmaster01 ~]# cat /etc/motd
    6. riyimei.cn
    7. [root@rmaster01 ~]#

    image.png

    ubuntu

    1. login01@k8s:~$ ll /etc/update-motd.d
    2. total 68
    3. drwxr-xr-x 2 root root 326 Mar 27 06:08 ./
    4. drwxr-xr-x 91 root root 8192 Mar 27 06:04 ../
    5. -rwxr-xr-x 1 root root 1220 Apr 9 2018 00-header*
    6. -rwxr-xr-x 1 root root 1157 Apr 9 2018 10-help-text*
    7. lrwxrwxrwx 1 root root 46 Aug 6 2020 50-landscape-sysinfo -> /usr/share/landscape/landscape-sysinfo.wrapper*
    8. -rwxr-xr-x 1 root root 4646 Sep 27 2019 50-motd-news*
    9. -rwxr-xr-x 1 root root 749 Mar 27 06:08 60-my-welcome-info*
    10. -rwxr-xr-x 1 root root 604 Mar 21 2018 80-esm*
    11. -rwxr-xr-x 1 root root 3017 Mar 21 2018 80-livepatch*
    12. -rwxr-xr-x 1 root root 97 Nov 12 2018 90-updates-available*
    13. -rwxr-xr-x 1 root root 299 Jun 3 2019 91-release-upgrade*
    14. -rwxr-xr-x 1 root root 165 Feb 17 2020 92-unattended-upgrades*
    15. -rwxr-xr-x 1 root root 129 Nov 12 2018 95-hwe-eol*
    16. -rwxr-xr-x 1 root root 111 Sep 20 2018 97-overlayroot*
    17. -rwxr-xr-x 1 root root 142 Nov 12 2018 98-fsck-at-reboot*
    18. -rwxr-xr-x 1 root root 144 Nov 12 2018 98-reboot-required*
    19. login01@k8s:~$
    1. cd /etc/update-motd.d
    2. 添加脚本
    1. login01@k8s:~$ cat /etc/update-motd.d/60-my-welcome-info
    2. #!/bin/sh
    3. printf "========================================================\n"
    4. printf "========================================================\n"
    5. printf "重要的事情说三遍:\n"
    6. printf "不要再使用rm执行删除操作, 要使用trash-put命令执行删除操作, 使用trash-put命令删除的文件可以恢复\n"
    7. printf "不要再使用rm执行删除操作, 要使用trash-put命令执行删除操作, 使用trash-put命令删除的文件可以恢复\n"
    8. printf "不要再使用rm执行删除操作, 要使用trash-put命令执行删除操作, 使用trash-put命令删除的文件可以恢复\n"
    9. printf "========================================================\n"
    10. printf "========================================================\n"
    11. login01@k8s:~$

    image.png