Reading EPUB files without an EPUB reader

Nitin Venkatesh's Gravatar

Nitin Venkatesh
published Nov. 18, 2013, 12:17 p.m.

If you're ever stuck on a computer that has no EPUB reader but you need to read one, you don't need to worry about downloading an EPUB reader.

What you should realise is that EPUB is just compressed archive of HTML files. So uncompressing it, reveals it's contents and you can read them with any web-browser.

Here's an example. I'll be using The Debian Administrator's Handbook, which is a free book itself, so feel free to grab a copy :)

# Peeking at the file info
nits@excalibur:~/Desktop$ file debian-handbook.epub 
debian-handbook.epub: EPUB ebook data

# Unzipping the EPUB file into a directory called debian_handbook
nits@excalibur:~/Desktop$ unzip debian-handbook.epub -d debian_handbook
Archive:  debian-handbook.epub
 extracting: debian_handbook/mimetype  
   creating: debian_handbook/META-INF/
  inflating: debian_handbook/META-INF/container.xml  
   creating: debian_handbook/OEBPS/
  inflating: debian_handbook/OEBPS/ch09s13.html  
  inflating: debian_handbook/OEBPS/ch09s04.html  
  inflating: debian_handbook/OEBPS/pr01.html  
  inflating: debian_handbook/OEBPS/ch09s09.html  
  ..... #very long output hidden

# 'cd' and 'ls' the extracted contents
nits@excalibur:~/Desktop$ cd debian_handbook/OEBPS/
nits@excalibur:~/Desktop/debian_handbook/OEBPS$ ls
apa.html       ch03.html     ch08s04.html  ch10s04.html  ch14s04.html
apas02.html    ch03s02.html  ch08s05.html  ch10s05.html  ch14s05.html
apas03.html    ch04.html     ch08s06.html  ch10s06.html  ch14s06.html
 ..... #very long output hidden

# Viewing a specific chapter or part of the book
nits@excalibur:~/Desktop/debian_handbook/OEBPS$ gnome-open ch01.html

This opens up your default web-browser and you can read the contents in all it's glory.

screenshot of open book

This article can also be found on my blog