PDF is an acronym for Portable Document Format. It is a proprietary file format developed by Adobe Systems for representing two-dimensional documents in a device independent and resolution independent format. You can open pdf file using graphical as well as command line tools (i.e. without GUI). Linux supports following PDF viewer under X window:
- Gnome pdf viewer (gpdf)
- KDE pdf viewer (kpdf)
- xpdf
- Official Adobe acrobat reader
Graphic pdf viewer under Linux/FreeBSD
If you are using Gnome desktop...
Open a shell prompt and type the command:
$ gpdf file.pdf
OR
$ evince file.pdf
If you are using KDE desktop...
Open a shell prompt and type the command:
$ kpdf file.pdf
You can also click on K icon > Select Graphics > Select PDF viewer
Console pdf viewer under Linux/FreeBSD
Console pdf viewer
As far as I know there is no console based PDF viewer exists. But you can use the following trick to open a PDF file:
a) First install pdftohtml - A command-line tool for converting pdf-files into html and other formats.
Debian User install pdftohtml using following command:
# apt-get install pdftohtml
Red Hat / Fedora user install pdftohtml using following command:
# yum install pdftohtml
FreeBSD user install pdftohtml using following command:
# pkg_add -v -r pdftohtml
OR use ports collection:
# cd /usr/ports/textproc/pdftohtml
# make; make install
The idea is very simple you will use a pdftohtml program to convert a PDF file into html, xml and png images and then display them using text browser such as elinks or lynx. This is useful when you works on remote server or if GUI is not available:
For example to convert CH09.PDF file you need to type the following set of commands:
$ pdftohtml CH09.PDF
$ lynx CH09.html
OR
$ elinks CH09.html

You can also convert a PDF file to text file using following command:
$ pdftotext CH09.pdf
$ vi CH09.txt
See also
=> You can get Official Adobe acrobat reader here for UNIX/Linux oses.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop















{ 11 comments… read them below or add one }
For RHEL5 gpdf is obsolete. You now use evince.
–Lego
Great advice. I now use KDE and couldn’t figure it out until I read your article.
In Linux C programming how to open a pdf file with default reader?
thanks for advance…
xdg-open file.dvi
Thank you for intro to pdftohtml .
Thanks buddy..!!!
great article
there is no any other way to open .pdf file in terminal? without converting file???
You need not convert pdf to view it
On the terminal type the following command
user$ evince .pdf
This opens up the pdf for you to view
but it’s open Document viewer…. i wan’t to show pdf complite on terminal… It’s possible?
$ pdftotext file.pdf -