How to Install and Use LeafPad on Linux?

How To Install LeafPad On Linux

Whether you’re a developer or just a normal user who needs to write down things on your computer, there’s a good chance that you use some kind of text editor. 

Leafpad is a minimalist and lightweight text editor. It was first released on GitHub in 2004 by Tarot Osuji. It is open-source and free to use. It has very few dependencies and a simple UI. It is a simple text editor similar to Notepad and based on GTK+. It was the default text editor in Lubuntu but was later replaced by FeatherPad.

Key features of LeafPad

  • There are multiple tabs supported in Leafpad.
  • It has basic features like undo/ redo, cut, copy, paste find and replace, and easy navigation.
  • It has automatic word suggestions and completion as well.
  • It supports syntax highlighting if you’re typing code in it. And it’ll also show the line numbers.
  • The interface is very simple and easy to use. It is not cluttered or filled with a lot of things like in modern text editors.
  • It is known for its speed. It is quick and easy to run on low-powered systems as well.
  • It supports customization as well. You can change the colors of your text and fonts. 

Essential Pre-Installation Steps for LeafPad on Linux

LeafPad is a lightweight text editor originally the default in Lubuntu and known for its minimalistic interface and quick performance. It supports basic functionalities like undo/redo, cut/copy/paste, find/replace, and syntax highlighting. Installing LeafPad on Linux can be achieved through package managers like snap or apt-get, or by building from the source. Ensure you meet prerequisites like root access and appropriate GTK+ version.

Some of the prerequisites before installing Leafpad on Linux are:-

  • You should have root or sudo access to your system.
  • Check if Leafpad supports your Linux distro. It was removed from later versions of Linux distros. For example – Ubuntu 19.0.4 officially didn’t have support for Leafpad.
  • GTK+ 2 or later should be installed in your system.
  • You should have a stable internet connection.
  • You should update your package manager repositories, and system as well.
  • You should have enough storage space for the Leafpad.

Step-by-Step Guide to Installing LeafPad on Various Linux Distros

Leafpad is relatively easy to install on older versions of Linux distro because they have better support for Leafpad. We’ve listed the procedure to install Leafpad on different Linux distros. 

Installing Leafpad on Linux via snap

snap is a package manager for Linux distros. The Leafpad package is available on the snap repositories. If snap is installed in your system then you can use the following command:-

sudo snap install leafpad
Leafpad Snap Install

Installing Leafpad on Linux through GUI

The steps to Install Leafpad through the GUI are:-

  • Open the menu/ app drawer.
  • Search for Leafpad.
  • Install the Leafpad application by the install button.
  • Search for the Leafpad from the application list and run it.
Leafpad GUI Install

If Leafpad is not available on your Application store then it’s probably not “officially” available on your Linux distro. You can try other methods listed below to install Leafpad.

Installing LeafPad on Ubuntu 18.04 or earlier

In Ubuntu 18.04 or earlier the Leafpad package is available on the default apt package manager. The command to install it through the terminal is:-

sudo apt install leafpad

Installing LeafPad on Ubuntu 19.04 and later

In Ubuntu 19.04 and later the apt package will not be able to install Leafpad. Instead, you can use snap package manager using the following command:-

sudo snap install leafpad

Installing LeafPad on Linux using the source file

You can install the Leafpad by downloading its source file from the website. The steps to do so are:-

  • Open the terminal as a superuser. You can use the sudo command and enter the password to do so.
  • Update the package manager and system by the following command:-
sudo apt-get update
sudo apt-get upgrade
  • Install the dependencies needed for LeafPad using the following command:-
sudo apt-get install build-essential checkinstall intltool libgtk2.0-dev
Leafpad Dependencies
  • Then download the source file, compile it and then build it using the following command:-
mkdir -v $HOME/leafpad_build && cd $HOME/leafpad_build && \
wget && \
tar xvf leafpad- && cd leafpad- && \
./configure && make && \
sudo checkinstall -D --install=yes --fstrans=no --pakdir "$HOME/leafpad_build" \
     --pkgname leafpad --backup=no --deldoc=yes --deldesc=yes --delspec=yes \
     --default --pkgversion "" && \
make distclean && sudo ldconfig
Leafpad Building From Source

Methods to Uninstall LeafPad from Linux

There are multiple ways to Uninstall Leafpad. They’re listed below:-

Uninstalling Leafpad using snap

If Leafpad is installed in your through snap then you can uninstall it via snap as well. The command to do so is:-

sudo snap remove leafpad

Uninstalling Leafpad using apt

If Leafpad is installed in your through apt then you can uninstall it via apt as well. The command to do so is:-

sudo apt remove leafpad

How to Use LeafPad on Linux

Leafpad is very minimal and simple to use. The welcome screen looks like this:-

Leafpad GUI

There are only necessary options given in the navigation menu. You can write the notes/ data/ or even code in the file. Save it from the File menu. Open a new file from the File menu as well. 

Leafpad File Menu

The options menu lets you customize settings like Font style, Font Family, Font size; toggle auto-indentation, word wrap, and line numbers.

Leafpad Options Menu

Wrapping Up: Is LeafPad the Right Choice for You?

If you want a lightweight and simple text editor then Leafpad is a good option. We’ve listed the prerequisites and ways to install it on different versions of Linux distros. LeafPad offers a no-frills experience for text editing but hasn’t seen active development for some time. Is sticking to simplicity worth compromising on new features?


Leafpad snap site –