How to convert an EPUB to MOBI format on Linux

EPUB and MOBI logo

The electronic books or ebook They are the order of the day, and as usual, there is some discrepancy between different developers or they need different specifications for their products. That is why the number of formats that an ebook can take are very wide. That is nutritious, because we can choose the best option for our case, since each one has its advantages and disadvantages, but the truth is that it makes it difficult to support all existing software and devices.

Most programs or devices like Kindle and other digital book readers only support a few formats. In these cases, when we have downloaded or acquired an electronic book or comic in a certain format and we want to reproduce it in a different medium, then that is when problems arise. Well, let's first look at the most fundamental formats that exist and then we will explain how to transform from EPUB to MOBI and also from PDF to MOBI ...

Most prominent ebook formats:

kindle e-reader

Know the different formats ebook will help us to differentiate between the characteristics of one and the other and which devices or programs are compatible or not with them:

  • MOBI: They are compatible with Amazon Kindle readers and also for Amazon apps for mobile devices such as smartphones and tablets. Unfortunately they are not accepted by other devices ...
  • EPUB: it is one of the main formats to read text, with a fairly complete service and used by small stores. It is quite compatible with most devices and very versatile. There is a more modern variant called ePUB3 with .epub3 extension to which more features have been added as an evolution of the previous one. It supports annotated, marked, own audiobook functionalities, synchronization with videos, text, etc. EPUB3 aims to be the standard for ebooks in the future.
  • TXT: auqneu is a simple text file, it is also used in some cases of simple books. It is compatible with most readers.
  • PDF: It is one of the most universal formats, and having a .pdf format guarantees compatibility with almost any device and software. So much so that it has become the standard.
  • Mobipoket, KF8 and Topaz: They have extensions like .mobi, .pcr, .azw, .azw3 and .tpz, they are unique Kindle formats for Amazon device and support annotations, bookmarks and carry DRM.
  • Fictionbook: It is a file with the extension .fb2 open and very widespread in Russia, although it is not typical here. It does not accept DRM, but it does support semantic marking, so it can be easily converted to other formats. As above, it supports bookmarks and annotations, adapting well to the screen.
  • Daisy: .dbt is the typical format for audiobooks. They are especially aimed at users with disabilities. The audio and the text are synchronized, which allows navigation through the book (go to a page, do a search ...)
  • comic books: (.cba, .cbr, .cbz) is a typical format of many digital comics, although it works for any book with many images. To optimize weight, they are compressed. The extension depends on the compression: .cbz for ZIP; .cbr for RAR and .cba for ACE, although it supports other types of compression formats. It is not interactive, does not allow annotations or does not fit the screen.
  • Open-eBook: it is the predecessor of the ePub and it is distributed with the extension .opf. It is a standard format endorsed by NIST.
  • PalmReader: files with a .pml extension are the typical markup language format created by Palm Reader. It can be opened with eReader, but it is not suitable for portability.
  • BBeB: it is the outdated format of Sony readers, with extensions .lrf and .lrx. The new readers of this brand no longer support it and the catalog of titles goes to ePub, therefore you should discard it.
  • Microsoft LIT: It is the format that Microsoft Reader reads, with a .lit extension. It was one of the first e-book formats and was very successful, but is not currently supported. It is derived from the CHM format, also from Microsoft.
  • iBooks: It is the format of books created with Apple Author iBooks. It is aimed at self-publishing the enriched book, with many possibilities for interactivity and collaborative work. Only for iOS devices, and they have a .ibook extension.
  • DjVu: it is a not very widespread alternative to PDF. Its extension is .djvu and unlike PDF, it was born as an open file format. Many public domain books are scanned in this format. Allows annotations and bookmarks.
  • HTML: It is the proper format of web pages and all devices that have a browser installed read it. The disadvantage is that they do not include the images, videos, etc., in a single file, but believe it or not, there are ebooks with the .html extension.
  • CompiledHTML: the .chm format is the one created by Microsoft as we said earlier. It was created to provide online help content. It is used for editing ebooks because it can compile several HTML into a single file and link them together.
  • RTF: .rtf is the rich text format. Microsoft created it to be able to give characteristics to the text (italics. Font type, size ...). Most word processors read and write this format, and almost all readers support it. Due to its simplicity, it does not have many features of the electronic book.
  • DOC (.doc, .docx): It is the native format of Microsoft Word. Editing ebooks in this format is usually less professional, so it is not very advisable either and not all programs and devices support it, far from it ...

Certainly Caliber supports almost all of these formats, making it a fantastic management tool.

And if you use Caliber you can also convert KFX to epub using a simple plugin. As you can see, it is full of possibilities.

Ways to convert EPUB to MOBI:

epub to mobi

Remember that Kindle does not directly support EPUB format, so it can be a nuisance to have books of this type if you have devices or the Kindle app.

With Caliber:

Well for convert EPUB to MOBI and to be able to reproduce this format on our Amazon Kindle tablet or eBook reader, we can use Caliber. One time downloaded and installed Caliber we can comment to work with him. For example, if you work with a Debian or derivatives, you can do it from the distro repositories with:

sudo apt-get install calibre

Or for the more generic procedure, you can opt for install it like this:

<pre class="command">sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"</pre>

In case that doesn't work, you can also try this other method from source code:

<pre class="command">curl -L https://calibre-ebook.com/dist/src | tar xvJ 
cd calibre*
sudo python2 setup.py install</pre>

Well, be that as it may, once you have Caliber installed, we can do it from the graphical interface in a simple way, passing our EPUB to MOBI, but we are going to explain how to do it from the console with:

ebook-convert nombre.epub nombre.mobi

With KindleGen:

If you are not convinced by this option, you can opt for the Amazon Kindle Gene they have created to convert from EPUB to MOBI. The first thing is to install it, for this we download it from this web page. We just have to unzip the downloaded file and once the directory is generated, we enter it and directly execute the command to invoke KindleGen from the console:

./kindlegen nombre.epub -c2 -verbose -o nombre.mobi

Always remember to change the names of the files for those you have in your case ...

Ways of converting PDF to MOBI:

PDF and MOBI icon

There are several ways or alternatives to convert a format PDF to MOBI. You have probably already heard about the fantastic Caliber program with which to manage your eBook library. With it you will also be able to convert between a multitude of different formats, from the most typical such as PDF, ePUB, to other lesser known ones. Its graphical interface is simple and we just have to load the file into its library and then convert it separately or in a group ... but unfortunately Caliber does not support MOBI.

You will also have seen the web options we have. There are many Web pages With which we work from any web browser to perform online image resizing, photo retouching, to transforming between different formats. The truth is that there are many and you can also find them with a service to transform from PDF to MOBI in a fast way. It is true that some require registration or payment, but there are also many free.

But neither one thing nor the other is what we seek to explain in this article, what we want is a local tool in our Linux distro to be able to carry out the conversion in a simple and fast way. For this we are going to use the package called ebook converter, a small program that will allow you to switch between different ebook formats. You can easily find it in the repositories of your favorite distribution with total normality, and if not, you can always download it from the network.

And how can we pass a file in PDF format to another MOBI with this package? Well, once installed, we go to a console and run the following command from the directory where the PDF is located. Obviously you will have to replace the names of the files with the ones you need in each case ...:

ebook-converter nombre.pdf .mobi

And so the PDF will be replaced by the new .mobi file.

If you have suggestions or questions, don't forget to leave your comments.


Leave a Comment

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

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   URxvt said

    Use pandoc :)