I: Long version
-----------------------------------------------------

there are a lot of messages displayed by default, if you login, into your ubuntu, let's say version 22.04 LTS.

The messages have there origin in folder:
/etc/update-motd.d/

#remove the execution of some scripts
chmod -x /etc/update-motd.d/*



-----------
old approach, that does not really work:

to disabled all of them, may solution is:
mkdir /etc/update-motd.d.original/
mv /etc/update-motd.d/* /etc/update-motd.d.original/

and disable the service:
systemctl disable motd-news.service
--------------

and just create a classic motd file:
/etc/motd
##########################################################
#
# some information
#
# motd
#
##########################################################



II: Short version
-----------------------------------------------------
1. Disable System default MOTD files on Ubuntu:
sudo chmod -x /etc/update-motd.d/*
2. Use the default MOTD
sudo vi /etc/motd
3. Optional enable the 00-header
sudo chmod o+rx /etc/update-motd.d/00*

computer2know :: thank you for your visit :: have a nice day :: © 2024