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