Create a wiki on your Linux desktop with Zim

Get that wiki feeling on the desktop with Zim, a powerful, yet compact tool for managing information.
295 readers like this.
bees network

Opensource.com

There's no denying the usefulness of a wiki, even to a non-geek. You can do so much with one—write notes and drafts, collaborate on projects, build complete websites. And so much more.

I've used more than a few wikis over the years, either for my own work or at various contract and full-time gigs I've held. While traditional wikis are fine, I really like the idea of desktop wikis. They're small, easy to install and maintain, and even easier to use. And, as you've probably guessed, there are a number a desktop wikis available for Linux.

Let's take a look at one of the better desktop wikis: Zim.

Getting going

You can either download and install Zim from the software's website, or do it the easy way and install it through your distro's package manager.

Once Zim's installed, start it up.

A key concept in Zim is notebooks. They're like a collection of wiki pages on a single subject. When you first start Zim, it asks you to specify a folder for your notebooks and the name of a notebook. Zim suggests "Notes" for the name, and ~/Notebooks/ for the folder. Change that if you want. I did.

Setting the Zim notebook name and folder

opensource.com

After you set the name and the folder for your notebook, click OK. You get what's essentially a container for your wiki pages.

A container for your wiki pages

opensource.com

Adding pages to a notebook

So you have a container. Now what? You start adding pages to it, of course. To do that, select File > New Page.

Creating a new page

opensource.com

Enter a name for the page, then click OK. From there, you can start typing to add information to that page.

Typing notes

opensource.com

That page can be whatever you want it to be: notes for a course you're taking, the outline for a book or article or essay, or an inventory of your books. It's up to you.

Zim has a number of formatting options, including:

  • Headings
  • Character formatting
  • Bullet and numbered lists
  • Checklists

You can also add images and attach files to your wiki pages, and even pull in text from a text file.

Zim's wiki syntax

You can add formatting to a page using the toolbar, but that's not the only way to do the deed. If, like me, you're kind of old school, you can use wiki markup for formatting.

Zim's markup is based on the markup that's used with DokuWiki. It's essentially WikiText with a few minor variations. To create a bullet list, for example, type an asterisk. Surround a word or a phrase with two asterisks to make it bold.

Adding links

If you have a number of pages in a notebook, it's easy to link them. There are two ways to do that.

The first way is to use CamelCase to name the pages. Let's say I have a notebook called "Course Notes." I can rename the notebook for the data analysis course I'm taking by typing "AnalysisCourse." When I want to link to it from another page in the notebook, I just type "AnalysisCourse" and press the space bar. Instant hyperlink.

The second way is to click the Insert link button on the toolbar. Type the name of the page you want to link to in the Link to field, select it from the displayed list of options, then click Link.

Adding a link

opensource.com

I've only been able to link between pages in the same notebook. Whenever I've tried to link to a page in another notebook, the file (which has the extension .txt) always opens in a text editor.

Exporting your wiki pages

There might come a time when you want to use the information in a notebook elsewhere—say, in a document or on a web page. Instead of copying and pasting (and losing formatting), you can export your notebook pages to any of the following formats:

  • HTML
  • LaTeX
  • Markdown
  • ReStructuredText

To do that, click on the wiki page you want to export. Then, select File > Export. Decide whether to export the whole notebook or just a single page, then click Forward.

Exporting a notebook

opensource.com

Select the file format you want to use to save the page or notebook. With HTML and LaTeX, you can choose a template. Play around to see what works best for you. For example, if you want to turn your wiki pages into HTML presentation slides, you can choose "SlideShow_s5" from the Template list. If you're wondering, that produces slides driven by the S5 slide framework.

Selecting export format

opensource.com

Click Forward. If you're exporting a notebook, you can choose to export the pages as individual files or as one file. You can also point to the folder where you want to save the exported file.

Defining the output folder

opensource.com

Is that all Zim can do?

Not even close. Zim also has a number of plugins that expand its capabilities. It even packs a built-in web server that lets you view your notebooks as static HTML files. This is useful for sharing your pages and notebooks on an internal network.

All in all, Zim is a powerful, yet compact tool for managing your information. It's easily the best desktop wiki I've used, and it's one that I keep going back to.

Tags
That idiot Scott Nesbitt ...
I'm a long-time user of free/open source software, and write various things for both fun and profit. I don't take myself all that seriously and I do all of my own stunts.

9 Comments

I never really understood the benefits of using specialized personal wiki software. Always thought that, for reference and personal note keeping, keeping LibreOffice files or even text files properly organized under some folder is the best option: no extra software to install, easy search (grep, for example) and, most importantly, easy to synchronize with cloud storage services (think Dropbox or any other similar service) so that the notes are available in any device.

Not every solution or path is right for everyone. While I like tools like Zim, I do most of my work with plain text files. With a text editor and Nextcloud, I can sync my work across all my devices.

In reply to by Rodrigo

> text files properly organized under some folder

But that's the beauty of ZIM. It does exactly that: one folder and everything is organized underneath as subDirectories and 7-bit text files. It's why I choose it. You can copy the entire folder anywhere (including dropbox plus Cryptomator for security) and access on any device.

You can still grep (or use the built in search), you can traverse via the interface (or use any filemanager or system cd). You have the option of a kind of Markdown for wordprocessing which just further empowers your text files.

In reply to by Rodrigo

Good point. It's whatever works for you. While Zim works for me, a text editor works just a bit better. Your mileage (or whatever unit of distance you use) will undoubtedly vary.

In reply to by john379 (not verified)

Zim files are just text files, with some wiki formatting in them if you format the notes. They sync just fine with Dropbox, and if you can't get Zim working on your non-Linux work laptop (I'm talking to you High Sierra) you can easily view and edit with a text editor.

There are many ways to keep notes. Perhaps my favorite for something I want access to from various devices is to make ePubs, with Sigil. You can import HTML files, images, create a TOC, all quite easily.
Sometimes all you need is a text file.
I've also created some HTML forms for some kinds of things like grocery lists. When I click Submit, PHP makes a page I can print, and simultaneously sends an email to my phone.

Great article! I found Zim back in early 2015, after starting to use Microsoft OneNote at work. I wanted something for my Linux computer at home that had similar capabilities as OneNote, but most of the offerings were just too "heavy" for me. Zim is a perfect fit, allowing me to customize it to my liking.

I've been using http://www.xwiki.org for about a year. I have about 250 pages of content. So easy to use, and you can export the content as HTML, which helped me migrate from macOS to Fedora. I set it up to be my default web page in my browser so it hosts my portal to the wider internet. Once you start using it, you won't want to stop.

I've been using Zim for many years so it holds several megabytes of programming notes documentation for me.

The way to link to another Notebook is like this example...

With 2 notebooks (which are just directories/folders registered in Zim) in your ~/Notebooks directory named Notes and Code, a link from Notes to a page (file) in Code would have the prefix "Code?". Thus...

Code?Python:Indentation

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.