[h1]How to disable Ubuntu 16/18 MOTD "XX packages can be updated"[/h1]
Just go to "/etc/update-motd.d/ and disable whatever you like to hide. 🆒
e.g. Comment all line with "#", or add an "exit 0"
to disable Update notify
代碼:
$ cd /etc/update-motd.d
$ ls -al
total 36
drwxr-xr-x 2 root root 4096 Oct 7 14:46 .
drwxr-xr-x 99 root root 4096 Oct 7 14:45 ..
-rwxr-xr-x 1 root root 1220 Oct 23 2015 00-header
-rwxr-xr-x 1 root root 1157 Jun 14 2016 10-help-text
-rwxr-xr-x 1 root root 97 May 25 2016 90-updates-available
-rwxr-xr-x 1 root root 299 Jul 22 2016 91-release-upgrade
-rwxr-xr-x 1 root root 111 Nov 30 2016 97-overlayroot
-rwxr-xr-x 1 root root 142 May 25 2016 98-fsck-at-reboot
-rwxr-xr-x 1 root root 144 May 25 2016 98-reboot-required
$ vim 90-updates-available
(comment all line with #, or add an "exit 0" to disable Update notify)
$ vim 91-release-upgrade
(comment all line with #, or add an exit 0 to disable Ubuntu 14.XX -> 16.XX -> Ubuntu 18.XX big release upgrade)
$ vim 10-help-text
(comment all line with #, or add an exit 0 to disable URL @ motd link to Ubuntu document)
$ exit
Re-login
(2017-10-07 14:59)