How To Install console-log on Ubuntu 18.04

In this tutorial we learn how to install console-log on Ubuntu 18.04. console-log is Puts logfile pagers on virtual consoles

Introduction

In this tutorial we learn how to install console-log on Ubuntu 18.04.

What is console-log

console-log is:

console-log keeps logfile pagers open on virtual consoles. The default configuration puts exim’s mainlog on tty8, and the syslog on tty9, in a less process. It can also make sure that this console is visible automatically after system boot so that a crashed system at least leaves the syslog readable on the console before reset. Using a pager makes searching, tagging and highlighting possible.

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

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

sudo apt-get update

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

sudo apt-get -y install console-log

Install console-log Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install console-log

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

sudo aptitude -y install console-log

How To Uninstall console-log on Ubuntu 18.04

To uninstall only the console-log package we can use the following command:

sudo apt-get remove console-log

Uninstall console-log And Its Dependencies

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

sudo apt-get -y autoremove console-log

Remove console-log Configurations and Data

To remove console-log configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge console-log

Remove console-log configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge console-log

References

Summary

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