Install ccze on Ubuntu 22.04

Install ccze on Ubuntu 22.04

Reading and analyzing the log files in white text on a black background can be difficult and take a lot of time. Colorized log files is one of the solutions. The ccze is a command line tool that allows to print the colorized log files to make them more readable.

This tutorial shows how to install ccze on Ubuntu 22.04.

Install ccze

Make sure the package lists are up-to-date:

sudo apt update

Run the following command to install ccze:

sudo apt install -y ccze

Once installation is completed, we can check ccze version:

ccze --version

Testing ccze

The head, tail, cat or other command can be used to read the log file and then colorize the output by piping to ccze command. The -A option is used to generate ANSI output by inserting color codes in the log.

cat /var/log/dpkg.log | ccze -A

An example of output:

Colorized log file using ccze on Ubuntu

Uninstall ccze

If decided to completely remove the ccze, run the following command:

sudo apt purge --autoremove -y ccze

Leave a Comment

Cancel reply

Your email address will not be published.