How to view a PDF file in Linux

By | August 12, 2016

There are many ways to view PDF documents in a Linux environment. Depending on your needs, we currently recommend LibreOffice if you need to edit a PDF, and Evince for simple PDF viewing.

LibreOffice

LibreOffice Writer, which is part of the open source LibreOffice suite, does a great job opening, viewing, editing, and writing PDF documents.

Installing LibreOffice

To install LibreOffice, use the instructions below which correspond to your specific operating system:

Debian and Ubuntu

Debian and Ubuntu both use the APT package management system. In your terminal, run the following command to install the LibreOffice software package:

sudo apt-get update && sudo apt-get install libreoffice

CentOS

In CentOS first, download the LibreOffice package from https://libreoffice.org appropriate for your system architecture. For instance, in this example we have downloaded LibreOffice_5.1.4_Linux_x86-64_rpm.tar.gz, which is an RPM package of LibreOffice 5.1.4 for 64-bit computers, into our Downloads directory.

Open a terminal and navigate to the directory where you downloaded the archive, for example:

cd ~/Downloads

The archive is a gzipped tar file. Extract it:

tar -xzvf LibreOffice_5.1.4_Linux_x86-64_rpm.tar.gz

The archive directory structure is extracted into the current directory. Change to the directory containing the RPMs:

cd LibreOffice_5.1.4.2_Linux_x86-64_rpm/RPMS/

Then use the yum package manager to install all of the RPM packages. Any required dependencies are also downloaded and installed:

sudo yum localinstall *.rpm

Fedora

Installing LibreOffice on Fedora is similar to installing on CentOS. First, download the RPM archive for your machine architecture from https://libreoffice.org. In this case, we downloaded the same 64-bit RPM archive as above,LibreOffice_5.1.4_Linux_x86-64_rpm.tar.gz.

Navigate to the directory where you downloaded the archive, for example:

cd ~/Downloads

Extract the archive:

tar -xzvf LibreOffice_5.1.4_Linux_x86-64_rpm.tar.gz

Navigate to the directory containing the RPMs:

cd LibreOffice_5.1.4.2_Linux_x86-64_rpm/RPMS/

Finally, install all RPMs with the dnf package management tool. Dnf is similar to yum, but the command syntax is slightly different for installing local packages:

sudo dnf install *.rpm

OpenSUSE

OpenSUSE uses the zypper package management tool. From your terminal, run:

sudo zypper install libreoffice

Arch Linux

Arch Linux uses the pacman package manager. To install libreoffice, run:

sudo pacman -S libreoffice

or:

su -c “pacman -S libreoffice”

Choose the package libreoffice-fresh or libreoffice-still. For the newest features, choose libreoffice-fresh. For the version that is the most reliably stable, chooselibreoffice-still.

Evince PDF Viewer

Evince is a lightweight program that loads and renders PDF documents in a clean, precise manner. You may prefer it to LibreOffice if all you need to do is view a PDF.

Installing Evince

Debian, Ubuntu

sudo apt-get update && sudo apt-get install evince

CentOS

sudo yum install evince

Fedora

sudo dnf install evince

OpenSUSE

sudo zypper install evince

Arch

sudo pacman -S evince

-OR-

su -c “pacman -S evince”

Leave a Reply

Your email address will not be published.