Blog


How to create login info in motd similar to ubuntu server

Ever wondered how could you get this cool login screen you can see when you login to ubuntu server on other distros?

Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.16.0-37-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue Sep  8 14:10:39 CEST 2015

  System load:  0.14              Users logged in:     0
  Usage of /:   51.8% of 6.75GB   IP address for eth0: 192.168.2.1
  Memory usage: 27%               IP address for eth1: xxxxxxxxxxxx
  Swap usage:   10%               IP address for tun0: 192.168.8.1
  Processes:    136

  Graph this data and manage this system at:
    https://landscape.canonical.com/

This is a part of proprietary system called landscape. But this thing is too cool to remain proprietary, so I created a similar login info screen here: http://github.com/benapetr/system-info

All you need to do is to append it to your login scripts and here we go:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No mail.
Last login: Wed Sep  9 09:52:02 2015 from 27.23.broadband16.iol.cz

System information as of 2015-09-09 09:54:04:

  Users logged in: 2        System load: (0.22, 0.15, 0.08)
  Processes: 501            Free memory: 64%        
  Free swap: 96%

Generated by http://github.com/benapetr/system-info