motd - Nachricht des Tages, die Nachricht, die angezeigt wird, wenn Sie sich bei einem Linux-System (z. B. Ubuntu) anmelden.
FrĂŒher befand sich die Datei mit der BegrĂŒĂung in /etc/motd, jetzt befindet sich eine Reihe von Skripten im Verzeichnis /etc/update-motd.d/:
# ls -alh /etc/update-motd.d/
total 56K
drwxr-xr-x 2 root root 4,0K 22 2020 .
drwxr-xr-x 98 root root 4,0K 27 15:31 ..
-rwxr-xr-x 1 root root 1,2K 9 2018 00-header
-rwxr-xr-x 1 root root 1,2K 9 2018 10-help-text
lrwxrwxrwx 1 root root 46 22 2020 50-landscape-sysinfo -> /usr/share/landscape/landscape-sysinfo.wrapper
-rwxr-xr-x 1 root root 4,2K 20 2018 50-motd-news
-rwxr-xr-x 1 root root 604 21 2018 80-esm
-rwxr-xr-x 1 root root 3,0K 21 2018 80-livepatch
-rwxr-xr-x 1 root root 97 12 2018 90-updates-available
-rwxr-xr-x 1 root root 299 3 2019 91-release-upgrade
-rwxr-xr-x 1 root root 129 12 2018 95-hwe-eol
-rwxr-xr-x 1 root root 111 20 2018 97-overlayroot
-rwxr-xr-x 1 root root 142 12 2018 98-fsck-at-reboot
-rwxr-xr-x 1 root root 144 12 2018 98-reboot-required
Die Anzeigereihenfolge liegt normalerweise in der Reihenfolge der angegebenen PrioritÀten - 00, 10 usw.
Als Ergebnis der AusfĂŒhrung wird Folgendes angezeigt:
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-118-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Fri Nov 13 14:30:00 +08 2020
System load: 0.45
Usage of /: 9.8% of 109.84GB
Memory usage: 6%
Swap usage: 0%
Processes: 152
Users logged in: 0
IP address for enp4s0: 192.168.106.12
IP address for enxd037454bea65: 172.17.8.58
IP address for tun0: 10.8.0.1
IP address for docker0: 172.17.0.1
* Introducing self-healing high availability clustering for MicroK8s!
Super simple, hardened and opinionated Kubernetes for production.
https://microk8s.io/high-availability
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
233 .
174 .
New release '20.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Fri Nov 13 08:21:33 2020 from 85.192.x.214
Viel unnötiges fĂŒr uns - nicht wahr?
Ich werde das Teil deaktivieren und meine eigene BegrĂŒĂung hinzufĂŒgen.
Ich werde eine Datei erstellen und sie ausfĂŒhrbar machen.
# touch /etc/update-motd.d/99-intelcom
# chmod 755 /etc/update-motd.d/99-intelcom
Jetzt öffne ich es in einem beliebigen Editor und fĂŒge hinzu:
#!/bin/bash
echo -e '\033[34m#######################################################
#\033[33m PBX Intelcom - VoIP "" \033[34m#
#\033[33m www.a*p.ru .(3532)54-0X-0Y \033[34m#
#######################################################\033[0m'
-e â Escape , \033[34m \033[33m â , \033[0m â .
:
\033[30m â ;
\033[31m â ;
\033[32m â ;
\033[33m â ;
\033[34m â ;
\033[35m â ;
\033[36m â ;
\033[37m â .
:
\033[40m â ;
\033[41m â ;
\033[42m â ;
\033[43m â ;
\033[44m â ;
\033[45m â ;
\033[46m â ;
\033[47m â ;
\033[0m â .
sudo run-parts /etc/update-motd.d cat /var/run/motd.dynamic.
00-header- enthÀlt das sehr willkommene Willkommen zu Ubuntu 18.04.5 LTS (GNU / Linux 4.15.0-118-generic x86_64)
10-help-text- Links zu Informationen und Support
50-landscape-sysinfofĂŒhren zu einem Skript zum Abrufen von Systeminformationen
50-motd-news- einige Neuigkeiten
80-livepatch- Informationen zu Livepatch
80-esm- Informationen zu Extended Sicherheitswartung - Erweiterte Wartung des Sicherheitssystems
Weitere Skripte zu Updates, Neustarts usw.
Um unnötige Nachrichten zu deaktivieren, setze ich einfach die Rechte daran 400.
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-118-generic x86_64)
-rwxr-xr-x 1 root root 1,2K 9 2018 00-header
-r-------- 1 root root 1,2K 9 2018 10-help-text
lrwxrwxrwx 1 root root 46 30 13:45 50-landscape-sysinfo -> /usr/share/landscape/landscape-sysinfo.wrapper
-r-------- 1 root root 4,9K 14 02:59 50-motd-news
-r-------- 1 root root 604 22 2018 80-esm
-r-------- 1 root root 3,0K 22 2018 80-livepatch
-r-------- 1 root root 97 27 2018 90-updates-available
-r-------- 1 root root 299 19 2017 91-release-upgrade
-rwxr-xr-x 1 root root 165 17 2020 92-unattended-upgrades
-rwxr-xr-x 1 root root 129 27 2018 95-hwe-eol
-rwxr-xr-x 1 root root 111 27 2017 97-overlayroot
-rwxr-xr-x 1 root root 142 27 2018 98-fsck-at-reboot
-rwxr-xr-x 1 root root 144 27 2018 98-reboot-required
-rwxr-xr-x 1 root root 324 13 13:36 99-intelcom
Als Ergebnis bekam ich:
