The Distracting Gutter
Ubuntu’s default text editor, GNOME Text Editor (or gedit on older releases), includes a feature that displays line numbers in a narrow column along the left margin of the editing area. While extremely useful for programmers referencing error messages on specific lines, this line-numbering gutter is unnecessary and visually distracting for users who primarily use the text editor for writing prose, taking quick notes, or editing simple configuration snippets. The numbers create a visual anchor that draws the eye away from the actual content, and on smaller laptop screens, the gutter consumes valuable horizontal space.
Disabling Line Numbers in GNOME Text Editor
To stop Ubuntu from automatically showing line numbers in the default text editor, you must adjust the editor’s display preferences.
If you are using the newer GNOME Text Editor (default in Ubuntu 22.04 and later), open the application, click the hamburger menu (three horizontal lines) in the top-right corner, and select Preferences. Under the “Display” section, you will see a toggle labelled Display Line Numbers. Turn this toggle off. The line number gutter will vanish immediately. If you are using the older gedit editor, open it and navigate to Preferences via the hamburger menu. Switch to the View tab. Uncheck the box labelled Display line numbers. Alternatively, you can achieve this via the terminal with gsettings set org.gnome.TextEditor show-line-numbers false for the newer editor, or gsettings set org.gnome.gedit.preferences.editor display-line-numbers false for gedit. The setting persists across sessions.