MOTD Greeting for Linux with System Information

Martin Döring, 8th of September 2021

When you log on to Linux, you are usually greeted with some information called the message of today (MOTD). On Ubuntu or Arch this is located in the directory /etc/update-motd.d/ in the form of individual executable files that deliver certain information. The files are executed or displayed in the order of their numbering.

To get more concise and meaningful information for my system after login, I built the following file 00-system-info, which shows me some data about my computer like this, here an example:

2021-09-08-motd-example.png

The script:

The script has been tested on Ubuntu and Raspian. On systems that do not have the ip command, the lower network part must be adjusted, otherwise nothing will be displayed.

——

back