How to Get Started With Gedit Linux

Published:14 November 2022 - 4 min. read

Nicholas Xuan Nguyen Image

Nicholas Xuan Nguyen

Read more tutorials by Nicholas Xuan Nguyen!

Are you looking for a lightweight but excellent text editor for Linux? If so, you may want to check out the Gedit Linux text editor. A simple yet powerful editor that supports plugins, allowing customization and expansion, making it an excellent choice for developers of all levels of experience.

If you’re interested, then you’re in luck. This tutorial will show you how to start with Ubuntu’s Gedit Linux text editor. You’ll learn to install Gedit, use its basic features, and extend its functionality with plugins.

Ready? Read on to get started!

Prerequisites

This tutorial will be a hands-on demonstration. If you’d like to follow along, be sure you have an Ubuntu Linux machine handy. This tutorial uses Ubuntu 20.04 but should also work with recent Ubuntu releases.

Installing the Gedit Linux Text Editor via Ubuntu Software

Ubuntu Software is a graphical application for installing, updating, and managing software on Ubuntu. If you prefer a GUI application for installing Gedit, then this application is the way to go.

To install the Gedit Linux Text Editor using Ubuntu Software:

1. Click Activities in the upper-left corner of your screen and software & update in the search bar. Click the first result, Software & Update, as shown below.

Opening the Software & Updates application
Opening the Software & Updates application

2. Click on the Ubuntu Software tab. Tick the first four checkboxes, as shown below. This step ensures you can install the latest software from all sources. Click Close.

Configuring Ubuntu software sources
Configuring Ubuntu software sources

3. Enter the password for your user account and click Authenticate.

Authenticating the user.
Authenticating the user.

Click Reload to reload the available source repositories.

Reloading the available repositories
Reloading the available repositories

5. Click Activities, type ubuntu software into the search bar, and click the Ubuntu Software icon.

Launching Ubuntu Software
Launching Ubuntu Software

6. Click the search icon on the upper-left corner and type gedit into the search bar. Click Text Editor, which is the name of Gedit.

Searching for Gedit Linux text editor
Searching for Gedit Linux text editor

7. Click the Install button to begin the installation.

Install Gedit Linux text editor
Install Gedit Linux text editor
Click the green Install button
Click the green Install button

8. Enter your password and click Authenticate.

Authenticating the user
Authenticating the user

The installation starts, and a status bar shows you the progress.

Gedit Linux installation progress
Gedit Linux installation progress

9. After the installation, click the Permissions button.

Open Gedit permissions
Open Gedit permissions

10. The below screenshot shows the default permissions Gedit has, which are sufficient in most cases. But feel free to enable or disable permissions as you see fit. Click Close once you’re satisfied with the permissions set.

Inspecting the default Gedit permissions
Inspecting the default Gedit permissions

11. To launch Gedit, click Activities → search for gedit in the search bar → click the Text Editor icon.

Launching Gedit
Launching Gedit

The main Gedit window appears on your screen, as shown below.

Gedit Linux text editor window
Gedit Linux text editor window

Installing the Gedit Linux Text Editor via APT Package Manager

If you’re more comfortable working with the command line, you can install Gedit using the APT package manager.

1. Open a terminal window and run the following command to update your system’s package index.

sudo apt update -y

2. Now that your system’s package index is up-to-date install Gedit by running the following command.

sudo apt install gedit -y
Installing Gedit using APT
Installing Gedit using APT

3. Confirm that the installation was successful by checking the Gedit version.

As of this writing, the latest version is 3.36.2.

Checking the Gedit version
Checking the Gedit version
Checking the Gedit version

4. Finally, run the following command to launch Gedit.

gedit &

Note: The & at the end of the command tells gedit to launch as a background process, leaving the terminal available. If you close the terminal window, the Gedit process will also terminate.

Launching the Gedit Linux text editor from the terminal
Launching the Gedit Linux text editor from the terminal

Installing Gedit Plugins Package

Gedit comes with a few essential plugins enabled by default. But there are many other plugins available that can extend Gedit’s features.

1. Run the below command to install all of the gedit-plugins package for Gedit.

sudo apt install gedit-plugins -y
Installing Gedit plugins
Installing Gedit plugins

2. The previous command installed the plugins, but those plugins are not enabled by default. To enable a plugin for Gedit, open the main Gedit window → click the menu button → Preferences.

Opening the Gedit preferences window
Opening the Gedit preferences window

3. Click on the Plugins tab. Scroll through the list of available plugins and tick the checkbox next to the ones you wish to enable. To disable a plugin, untick the checkbox next to it instead.

To demonstrate, enable the Embedded Terminal plugin, then close the Preferences window.

Enabling a plugin for Gedit
Enabling a plugin for Gedit

4. To test the plugin, click the menu button → View → Bottom Panel.

Click View
Click View

5. Under View, tick the Bottom Panel checkbox, and the embedded terminal appears in the bottom panel, as you can see below.

Show the embedded terminal plugin
Show the embedded terminal plugin

Installing Gedit Plugins Individually

Instead of installing an entire pack of Gedit plugins, you can also install individual plugins manually. This method allows you to install only the plugins you need. Moreover, this method ensures that you’re installing the latest plugin version, which can be important for security reasons.

Where can you find these plugins? An excellent place to start is the official Gnome plugins page.

In this example, you’ll install the Code Folding plugin, which is unavailable in the Ubuntu repositories. This plugin helps you better organize your code by allowing you to collapse code blocks.

1. First, create a directory to store the plugin files. This example creates the folder /.local/share/gedit/plugins in your home directory.

mkdir -p ~/.local/share/gedit/plugins && cd ~/.local/share/gedit/plugins

2. Next, clone the plugin repository to your computer.

git clone https://github.com/aeischeid/gedit-folding
Downloading the plugin files
Downloading the plugin files

3. Now, open Gedit Preferences → Plugins. Look for the Folding plugin on the list, enable it, and close the Preferences window.

Enabling the plugin
Enabling the plugin

4. Next, open an existing code or type a new one. Highlight a section of code that you want to collapse and press Alt+Z. To unfold the code, press Alt+Z again.

Folding an unfolding code in Gedit
Folding an unfolding code in Gedit

Conclusion

In this tutorial, you have learned how to install Gedit Linux on your Ubuntu system in several ways. You have also learned how to install plugins to add additional functionality to Gedit.

Now that you know the basics of working with Gedit, you can start using it for your development projects. If you get bored with the Gedit interface, you may want to install the GtkSourceView style schemes to enhance your text editor experience.

Happy coding!

Hate ads? Want to support the writer? Get many of our tutorials packaged as an ATA Guidebook.

Explore ATA Guidebooks

Looks like you're offline!