How To Install update-motd on Ubuntu 18.04
Introduction
In this tutorial we learn how to install update-motd
on Ubuntu 18.04.
What is update-motd
update-motd is:
This package installs a script that immediately dynamically generates a message-of-the-day by running scripts installed in /etc/update-motd.d, in lexical order.
Other packages, or system administrators should symlink scripts into /etc/update-motd.d, pre-pending a 2-digit number to handle ordering.
The functionality formerly provided by this package is now integrated into pam_motd, in libpam-modules.
There are three methods to install update-motd
on Ubuntu 18.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install update-motd Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install update-motd
using apt-get
by running the following command:
sudo apt-get -y install update-motd
Install update-motd Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install update-motd
using apt
by running the following command:
sudo apt -y install update-motd
Install update-motd Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install update-motd
using aptitude
by running the following command:
sudo aptitude -y install update-motd
How To Uninstall update-motd on Ubuntu 18.04
To uninstall only the update-motd
package we can use the following command:
sudo apt-get remove update-motd
Uninstall update-motd And Its Dependencies
To uninstall update-motd
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove update-motd
Remove update-motd Configurations and Data
To remove update-motd
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge update-motd
Remove update-motd configuration, data, and all of its dependencies
We can use the following command to remove update-motd
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge update-motd
References
Summary
In this tutorial we learn how to install update-motd
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.