What are the default text editors (GUI and CLI) in different flavors of Ubuntu. what commands should we use to edit files with them?
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:
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:
To open a file with gedit:
Kate
Default in:
it is also available for Windows. Like many KDE apps it has a load of features. To install, run:
If you want the latest version of Kate, you'll need to add a PPA:
To open a file with kate:
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:
To open a file with leafpad:
Mousepad
Default in:
In philosophy, Mousepad is pretty similar to Leafpad. To install:
To open a file with mousepad:
Pluma
Pluma is a fork of Gedit which comes preinstalled in Ubuntu Mate. To install:
To open a file with pluma:
*Note: if you want to edit files with root privileges, add
gksu
in front of a command, like this:It's best to avoid using it with kate
CLI Text Editors
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:
For more information about Nano, see The Beginner’s Guide to Nano, the Linux Command-Line Text Editor.
Vim
To open a file with Vim, type either of these two commands:
or
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 tovim
, 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