How to Create an Ebook With Calibre in Linux [Complete Guide]

Complete beginner's guide to easily create an eBook in Linux with open source software Calibre.
Warp Terminal

Brief: This beginner’s guide shows you how to quickly create an ebook with Calibre tool in Linux.

Ebooks have been growing by leaps and bounds in popularity since Amazon started selling them several years ago. The good news is that they are very easy to create with Free and Open-Source tools.

In this tutorial, I’ll show you how to create an eBook in Linux.

Creating an eBook in Linux

Create An Ebook With Calibre In Linux

To create an eBook, you’ll need two pieces of software: a word processor (I’ll be using LibreOffice, of course) and Calibre.

Calibre is a great ebook reader and library program. You can use it to open ePub files in Linux or manage your eBooks collection.

Besides this software, you also need an eBook cover (1410×2250) and your manuscript.

Step 1

First, you need to open your manuscript with your word processor. Calibre can automatically create a table of contents (TOC) for you. To do so, you need to set the chapter titles into your manuscript to Heading 1.

Just highlight the chapter titles and select “Heading 1” from the paragraph style dropdown box.

select heading 1 1
Select Heading 1

If you plan to have subchapters and want them to be added to the TOC, then make all those titles Heading 2.

Now, save your document as an HTML file.

Step 2

In Calibre, click the “Add books” button. After the dialog box appears, you can browse to where your HTML file is located and add it to the program.

add ebook calibre 1

Step 3

Once the new HTML file is added to the Calibre library, select the new file and click the “Edit metadata” button.

edit meta data menu 1

From here you can add the following information: Title, Author, cover image, description and more. When you’re done, click “OK”.

edit metadata

Step 4

Now click the “Convert books” button.

In the new windows, there are quite a few options available, but you don’t need to use them all.

click convert e book

From the top right of the new screen, you select epub. Calibre also gives you the option to create a mobi file, but I found that those files didn’t always work the way I wanted them to.

meta data convert

Step 5

Click the “Look & Feel” tab from the left side of the new dialog box. Now, select the “Remove spacing between paragraphs”.

remove spacing between paragraphs

Next, we will create the table of contents. If don’t plan to use a table of contents in your book, you skip this step. Select the Table of Contents tab. From there, click on the select the wand icon to the right of “Level 1 TOC (XPath expression)”.

level 1 toc

In the new window, select “h1” from the drop down menu under “Match HTML tags with tag name”. Click “OK” to close the window. If you set up sub-chapters, set the “Level 2 TOC (XPath expression)” to h2.

select h1

Before we start the conversion, select EPUB Output. On the new page, select the “Insert inline Table of Contents” option.

inline table of contents

Now all you have to do is click “OK” to start the conversion process. Unless you have a huge file, the conversion should finish fairly quickly.

There you go, you just created a quick eBook.

For the more advanced users who know how to write CSS, Calibre gives your the option to add CSS styling to your text. Just go to the “Look & Feel” section and select the styling tab. If you try to do this with mobi, it won’t accept all of the styling for some reason.

extra css

Well, that was fairly easy, isn’t it? I hope this tutorial helped you to create eBooks in Linux.

Let me know in the comments if you have any questions. If you found this article interesting, please take a minute to share it on social media.

About the author
John Paul Wohlscheid

John Paul Wohlscheid

My name is John Paul Wohlscheid. I'm an aspiring mystery writer who loves to play with technology, especially Linux. You can catch up with me at:

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world


Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.