• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to show line numbers in Gedit

by admin

In the GNOME Shell desktop environment, accessing gedit is fairly straightforward. Click the Activities icon in the upper-right corner of the desktop window. When the search bar appears, click within the bar to access it, type gedit or text editor, and then click Text Editor.

If desired, you can start gedit from the command-line prompt in a GUI terminal emulator:

$ gedit myfile.txt

If we want every line in the text file to be shown with a line number automatically, we can do so by enabling it in the preferences.

1. Open the preferences as shown below.

gedit open preferences

2. On the view tab, select the Display line numbers and close the preferences window.

gedit line number enable

3. Now as you type in the file, each line will be shown with a line number.

gedit line nums

But note that this is just to display and the line numbers are not part of the file that gets saved.

Conclusion

The GNOME Project also provides a graphical text editor for programmers. The gedit editor provides some advanced features such as code syntax highlighting and line numbering, but it was designed to be a bare-bones editor. To spruce up the gedit editor, developers created plugins, which expand the features available in gedit. Plugins include a spell-checker, a terminal emulator, and a file browser.

Filed Under: Linux

Some more articles you might also be interested in …

  1. pmap Command Examples in Linux
  2. How to Disable IPv6 in CentOS/RHEL 8
  3. pacman: command not found
  4. Invalid ABI Option abi=aapcs-linux
  5. How To Configure SNMP Daemons: snmpd and snmptrapd on CentOS/RHEL 5,6 and 7
  6. How to persistently set nr_requests using UDEV rules
  7. How to Install and Configure Device Mapper Multipath in CentOS/RHEL 6,7
  8. How to enable/disable SELinux Modes in RHEL/CentOS
  9. tune2fs: command not found
  10. betterdiscordctl Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright