LinuxCommandLibrary

gedit

Edit text files with a graphical interface

TLDR

Open a text file

$ gedit [path/to/file]
copy

Open multiple text files
$ gedit [file1 file2 ...]
copy

Open a text file with a specific encoding
$ gedit --encoding [UTF-8] [path/to/file]
copy

Display a list of supported encodings
$ gedit --list-encodings
copy

SYNOPSIS

gedit [OPTION...] [URI...]

PARAMETERS

--new-window
    Open files in a new window

--new-document
    Start a new file in an empty window

--wait
    Wait until the application exits

--standalone
    Run as a standalone application

--version
    Show release version

--help
    Show help options

--help-all
    Show all help options

--list-plugins
    List available plugins

--display=DISPLAY
    X display to use

[URI...]
    Files or URIs to open

DESCRIPTION

Gedit is the default text editor for the GNOME desktop environment, offering a simple yet powerful interface for editing plain text files. It features syntax highlighting for hundreds of languages, automatic indentation, search/replace with regex support, and multi-document tabbed editing.

Users can customize it via plugins for added functionality like snippets, bracket matching, or file browsers. Gedit supports drag-and-drop, spell checking, and printing. It's lightweight, starting quickly, and integrates seamlessly with GNOME apps. Ideal for quick edits, coding, or configuration files. Command-line invocation allows opening specific files or creating new ones. While not a full IDE, its extensibility makes it versatile for developers and casual users alike. Requires GTK and a graphical session.

CAVEATS

Requires graphical environment (X11/Wayland) and GTK; not for terminals or headless servers. Plugins may need separate installation.

KEY FEATURES

Syntax highlighting (200+ langs), plugins, tabs, regex search, spellcheck.
Plugin manager in Preferences.

USAGE TIPS

Use gedit --new-window file.txt for separate windows.
Supports remote files via URIs like gedit sftp://user@host/file.

HISTORY

First released in 1998 with GNOME 1.0. Evolved alongside GNOME/GTK; major updates in GNOME 3/40+ with Flatpak support. Renamed 'Text Editor' UI in GNOME 42+, but gedit command persists.

SEE ALSO

nano(1), vim(1), emacs(1), mousepad(1)

Copied to clipboard