Clean up Ubuntu 18.04 MOTD
Noticed the following in my message of the day whenever I login to my Ubuntu server
Current MOTD
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-64-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Mon Sep 23 17:18:30 UTC 2019
System load: 0.0 Processes: 120
Usage of /: 37.9% of 29.02GB Users logged in: 0
Memory usage: 18% IP address for enp0s3: 10.0.2.15
Swap usage: 0%
* Congrats to the Kubernetes community on 1.16 beta 1! Now available
in MicroK8s for evaluation and testing, with upgrades to RC and GA
snap info microk8s
* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
0 packages can be updated.
0 updates are security updates.
Last login: Mon Sep 23 16:18:32 2019 from 10.0.2.2
You can see all the scripts to create the MOTD
$ ls -la /etc/update-motd.d
total 64
drwxr-xr-x 2 root root 4096 Sep 19 19:45 ./
drwxr-xr-x 152 root root 12288 Sep 19 19:53 ../
-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 Sep 19 19:45 50-landscape-sysinfo -> /usr/share/landscape/landscape-sysinfo.wrapper*
-rwxr-xr-x 1 root root 4264 Aug 19 2018 50-motd-news*
-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 12:51 91-release-upgrade*
-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*
After running these commands
sudo chmod -x /etc/update-motd.d/10-help-text && \
sudo chmod -x /etc/update-motd.d/50-motd-news && \
sudo chmod -x /etc/update-motd.d/80-livepatch
New MOTD
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-64-generic x86_64)
System information as of Mon Sep 23 17:20:09 UTC 2019
System load: 0.0 Processes: 120
Usage of /: 37.9% of 29.02GB Users logged in: 0
Memory usage: 18% IP address for enp0s3: 10.0.2.15
Swap usage: 0%
0 packages can be updated.
0 updates are security updates.
Last login: Mon Sep 23 17:18:31 2019 from 10.0.2.2