Gedit Command Not Found Error in Ubuntu

  • Post author:
  • Post comments:0 Comments
  • Reading time:2 mins read
Gedit Command Not Found Error in Ubuntu

Gedit is one of the favorite text editors of every Ubuntu user. Gedit is probably pre-installed in every Ubuntu computer. But sometimes it may happen that we have by mistakenly removed or uninstalled gedit from our computer which results in the error ‘gedit command not found‘ when we try to open it in the terminal.

There are two ways to check whether gedit is installed on our computer or not:

  1. By clicking windows button and searching for gedit in search box as seen below.
Searching gedit by using search bar

2. By entering gedit command in terminal as seen below.

Opening gedit using terminal

If by using both of the above methods you aren’t able to find gedit or getting gedit command not found error as seen in the below snap then you need to install or reinstall gedit as shown in the below methods.

gedit command not found error

Methods to Resolve Gedit Command Not Found Error

Method 1 : Installing Gedit Using Terminal

We can simply install the gedit text editor in our Ubuntu machine using the single line command in the terminal as given below.

$ sudo apt-get install gedit
Installing gedit to resolve gedit command not found error

After executing the above command gedit will be installed in our Ubuntu machine and we can check the same using above two methods.

Method 2 : Reinstalling Gedit Using Terminal

Sometimes it may happen that gedit is already installed in our machine, then also we are getting gedit command not found error. In this case we need to reinstall the gedit.

For reinstalling the gedit we first need to remove all the gedit packages which are already installed on our computer by using below two commands. Then we will be installing the gedit as shown in method 1.

$ sudo apt-get purge gedit gedit-common

$ sudo apt-get clean
Removing gedit so that we can re-install it.
Cleaning apt-get.

After executing both of the above commands we have successfully removed all the packages of gedit from our computer. Now we just need to install the gedit again using method 1.


In this tutorial, we learned how to resolve the gedit command not found error in the Ubuntu machine.

Leave a Reply