How do I open a PDF in a Linux terminal?

Evince” is the program used for opening and rendering a PDF document for viewing purposes only in a Linux terminal. It is GNOME’s default document viewer, so it comes pre-installed in the latest versions of GNOME. This post will briefly introduce the evince command and learn how to install evince in any Linux Operating system, the right syntax to use evince command, and how to use the evince command to open a PDF file in a Linux terminal.

Installation of Evince Command

If “evince” is not installed on your Linux Operating system, you can install it using the following commands based on your Operating system.

Ubuntu/Debian-based Operating Systems

For Ubuntu or Debian based Operating system, you can execute the command typed below to install evince:

$ sudo apt update && sudo apt install evince

CentOS/Fedora/RHEL-based Operating Systems

For the latest versions of CentOS, Fedora, or and RHEL-based Operating systems, the following command can be used for installing evince:

$ sudo dnf install evince

Arch Linux based Operating Systems

Arch Linux based Operating system users can execute the below-given command for installing evince without having the sudo privileges:

$ su -c “pacman -S evince”

Syntax

The syntax is really simple and easy.

Example

Suppose we have a PDF file “file.pdf” in the Downloads directory.

To Open the “file.pdf” file, either first navigate to the directory using the cd command:

Execute the evince command by providing it the PDF file’s name:

Or directly provide the file name and path to the evince command to open a PDF file from anywhere in a Linux terminal.

$ evince /Downloads/file.pdf

After providing a PDF file and executing the evince command, the PDF file will open up.

If you want to explore more about the evince command, you can walk through the man page of the evince command using the command typed below:

Conclusion

The evince command is a default document viewer of GNOME, and it can be used for viewing any document like images, PDF files, and URLs. In this post, we have learned to open a PDF in the Linux terminal using the evince command. If you want to learn more about the usage of the evince command, feel free to read the man page and use it to your exact needs.