View the `motd` after login in Ubuntu
When you ssh
into an Ubuntu machine, you may see a welcome message that starts with something like this:
Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-65-generic x86_64)
This is the motd
(message of the day).
What if you clear
your terminal after login but want to see that message again?
There are two ways to do this.
$ cat /run/motd.dynamic
This will show you the same message that was created for you when you logged in.
If there is dynamic information in that message and you want to see the latest version run:
$ sudo run-parts /etc/update-motd.d/
This will run all the scripts that make the motd message.
Tweet