• 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. How to create partitions inside loopback device
  2. CentOS / RHEL : How to log all LVM commands
  3. CentOS / RHEL : How to remove used Physical Volume(PV) from Volume Group (VG) in LVM
  4. How to change the interface name in CentOS/RHEL 8 using prefixdevname
  5. Active Directory Users Unable to Login via SSH using SSSD and Getting “Permission Denied, Please Try Again” [CentOS/RHEL]
  6. 11 Useful “ssh” and “scp” Commands in Linux
  7. Linux OS Service ‘cups’
  8. CentOS / RHEL : How To Check FC Brocade HBA Firmware
  9. Dependency failed for NFS server and services
  10. adduser Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright