How To Install a2ps on Ubuntu 22.04

Hostnbit
In this tutorial we learn how to install a2ps on Ubuntu 22.04. a2ps is GNU a2ps – Anything to PostScript converter and pretty-printer

Introduction

In this tutorial we learn how to install a2ps on Ubuntu 22.04.

What is a2ps

a2ps is:

GNU a2ps converts files into PostScript for printing or viewing. It uses a
nice default format, usually two pages on each physical page, borders
surrounding pages, headers with useful information (page number, printing
date, file name or supplied header), line numbering, symbol substitution
as well as pretty printing for a wide range of programming languages.

Historically, a2ps started as a text to PostScript converter, but thanks
to powerful delegations it is able to let you use it for any kind of files,
ie it can also digest manual pages, dvi files, texinfo, ….

Among the other most noticeable features of a2ps are:

  • various encodings (all the Latins and others),
  • various fonts (automatic font downloading),
  • various medias,
  • various printer interfaces,
  • various output styles,
  • various programming languages,
  • various helping applications,
  • and various spoken languages.

There are three methods to install a2ps on Ubuntu 22.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 a2ps Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install a2ps

Install a2ps Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install a2ps

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

sudo aptitude -y install a2ps

How To Uninstall a2ps on Ubuntu 22.04

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

sudo apt-get remove a2ps

Uninstall a2ps And Its Dependencies

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

sudo apt-get -y autoremove a2ps

Remove a2ps Configurations and Data

To remove a2ps configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge a2ps

Remove a2ps configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge a2ps

References

Summary

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

Hostnbit

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Menu Title
Scroll to Top