How To Install xmotd on Ubuntu 18.04

In this tutorial we learn how to install xmotd on Ubuntu 18.04. xmotd is message of the day browser for X

Introduction

In this tutorial we learn how to install xmotd on Ubuntu 18.04.

What is xmotd

xmotd is:

Xmotd is a message-of-the-day browser for X11 (with additional sysvnews-like support for dumb terminals). It displays a customizable message box which displays each message-of-the-day until the user has read them all, and then creates a stamp-file.

There are three methods to install xmotd 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 xmotd Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install xmotd using apt-get by running the following command:

sudo apt-get -y install xmotd

Install xmotd Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install xmotd using apt by running the following command:

sudo apt -y install xmotd

Install xmotd 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 xmotd using aptitude by running the following command:

sudo aptitude -y install xmotd

How To Uninstall xmotd on Ubuntu 18.04

To uninstall only the xmotd package we can use the following command:

sudo apt-get remove xmotd

Uninstall xmotd And Its Dependencies

To uninstall xmotd and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove xmotd

Remove xmotd Configurations and Data

To remove xmotd configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge xmotd

Remove xmotd configuration, data, and all of its dependencies

We can use the following command to remove xmotd configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge xmotd

References

Summary

In this tutorial we learn how to install xmotd package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.