My question here has to do with "gedit."

First of all, is it a Linux command or a text editor?

From what I have been surfing up recently, gedit is, from my results, a GNOME text editor.

And, at the same time in a different browser tab, I have a window open asking me to run:

sudo gedit /usr/share/applications/example.examplefiletype

which inevitably returns an error:

sudo: gedit is not a known terminal command

but it could be a Linux command because the site that gave me the command was from https://howto-ubuntunew.blogspot.ca.

So what exactly is gedit? And, if it is a Linux command, what is a Raspberry Pi substitute that would work the same way?

Oh, and if this might help you, I'm trying to install SweetHome for Linux, because from my sources, the RPi does work in a similar fashion to the Linux.


gedit is a text editor. It is an optional program that can be loaded - typically with the Gnome Desktop - but may not be loaded with every install. It is not a built-in command in the shell, but is called and executed when you invoke it. Of course, it has to be installed first, and according to your error message, it doesn't appear to be.

What you need to do is determine what text editor is loaded on your system and substitute that for gedit in the command. For example, I use the vi editor, so my line would be: sudo vi /usr/share/applications/example.examplefiletype.

It would be most helpful if you'd let us know what you've installed on your system (e.g. Raspbian with the Pi desktop, Lubuntu or something else.)

  • Thank you for your reply. I think you have given clear instructions on how this command would work. I will try this command again with leafpad. Nov 9 '17 at 22:24
  • 1
    I would recommend nano to a new user. If you use vi first look up commands on how to edit, save and exit vi. Nano give you a key action list on the bottom.
    – Blake
    Nov 15 '17 at 19:27

So what exactly is gedit?

gedit is a command. it will open a file with the file name entered on the command line.

I think you have not installed gedit editor.

So,Try this:

sudo apt-get upgrade

then install gedit:

sudo apt-get install gedit

Also, you can use nano editor. nano is already installed on Raspbian image, so it should just work. Like :

sudo nano /usr/share/applications/example.examplefiletype

gedit is a graphical text editor similiar to Windows' notepad.exe. All software in Windows and Linux can be started from the commandline irrespective whether they are commandline applications or not as long the graphical environment is running. gedit is no different.

Whether a piece of software is a "command" therefore depends solely if it resides in the PATH or not. Both Linux and Windows work with a PATH variable. Learn more here.

Please note that gedit is not preinstalled. Use leafpad instead if you don't want to download new software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.