Ubuntu – What are the default text editors in different flavours of Ubuntu

text-editor

What are the default text editors (GUI and CLI) in different flavors of Ubuntu. what commands should we use to edit files with them?

screensho


Behind the question

I tried Kubuntu and want to try more Ubuntu flavors and other distros, but when I was in Kubuntu I tried so hard to run gksu gedit /path/file.txt which wont work because gedit isn't the default text editor in Kubuntu, it's kate. I'm glad nano was available. but if I want to try more flavors I must know what are the default text editors in various Ubuntu flavors

Best Answer

  • I think Answers by Muzaffar and Terrance serves your need. One thing to note is that you can install any of these text editors in any flavors.


    GUI Text Editors

    Gedit

    Default in:

    1. Ubuntu Unity
    2. Ubuntu Gnome
    3. Ubuntu Kylin
    4. Ubuntu Budgie

    Gedit is certainly the most famous text editor in the Ubuntu world. Gedit is also available for Windows and MacOS. To install Gedit on any Ubuntu flavor use the following command:

    sudo apt-get install gedit
    

    To open a file with gedit:

    gedit /path/to.file.txt
    

    Kate

    Default in:

    1. Kubuntu
    2. KDE Neon (not an official Ubuntu flavor)

    it is also available for Windows. Like many KDE apps it has a load of features. To install, run:

    sudo apt-get install kate
    

    If you want the latest version of Kate, you'll need to add a PPA:

    sudo add-apt-repository ppa:kubuntu-ppa/backports
    sudo apt-get update
    sudo apt-get install kate
    

    To open a file with kate:

    kate /path/to.file.txt
    

    Leafpad

    Unlike Kate, emphasis of Leafpad is on simplicity and lightness, which is whole agenda of the LXDE project. It comes pre-installed on Lubuntu. To install:

    sudo apt-get install leafpad
    

    To open a file with leafpad:

    leafpad /path/to.file.txt
    

    Mousepad

    Default in:

    1. Xubuntu
    2. Ubuntu Studio

    In philosophy, Mousepad is pretty similar to Leafpad. To install:

    sudo apt-get install mousepad
    

    To open a file with mousepad:

    mousepad /path/to.file.txt
    

    Pluma

    Pluma is a fork of Gedit which comes preinstalled in Ubuntu Mate. To install:

    sudo apt-get install pluma
    

    To open a file with pluma:

    pluma /path/to.file.txt
    

    *Note: if you want to edit files with root privileges, add gksu in front of a command, like this:

    gksudo gedit path/to/file.txt
    

    It's best to avoid using it with kate


    CLI Text Editors

    Nano

    sudo apt-get install nano
    

    I don't know if Nano is installed on all the Ubuntu flavors, but it's installed on Ubuntu Unity, Ubuntu Gnome and Kubuntu as per my knowledge. To open a file with nano use following command:

    nano /path/to.file.txt
    

    For more information about Nano, see The Beginner’s Guide to Nano, the Linux Command-Line Text Editor.

    Vim

    sudo apt-get install vim
    

    To open a file with Vim, type either of these two commands:

    vim /path/to.file.txt
    

    or

    vi /path/to.file.txt
    

    Vim (or at least vi) is installed by default on all Ubuntu (or any other Linux) flavor. If you start to like Vim and want it to have a user interface try Gvim. Also note that on some systems, vi is aliased to vim, so both commands do identical things. (which launching vim)

    For more knowledge about vim, see A Beginner's Guide to Vim or run vimtutor in the terminal.


    Keep in mind that QT apps don't look good on Gtk based desktop and vice versa. but if you want them to feel at home, try this question How to make KDE applications look native in GNOME?


    More Linux Text Editors