12

There is another question which covers some suggestions for changing the motd on modern ubuntu systems which do not have /etc/motd.

However, the other question does not ask (or tell) where the current Ubuntu MOTD is being stored. Where is it?

1 Answers1

21

Traditionally , Unix motd would live in /etc/motd directory.RHEL still does that. Ubuntu on the other hand places login messages in /etc/update-motd.d/ directory.

$ ls /etc/update-motd.d/                                                        
00-header*     90-updates-available*  98-fsck-at-reboot*
10-help-text*  91-release-upgrade*    98-reboot-required*

Each of these scripts is responsible for dynamically assembling the whole message and provide specific parts.

It is still , however, possible to create a custom message in /etc/motd and place it into /etc/motd . File itself doesn't exist, but you just have to create it.

Here's how I tested it:

$ sudo sh -c 'echo  "THIS IS A TEST" >> /etc/motd'                             
[sudo] password for xieerqi: 
Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497