If you are new to Eclipse IDE and wondering how to enable the line numbers for your code, you can do it in following steps,
- Go to the Gutter area of any file.
- Right Click → Show Line Numbers
- Now you should be able to see the line numbers.
Below are some screenshots that can help you guide to it.

Enable line number eclipse

Line numbers visible Eclipse
Similarly if you want to disable line numbers Gutter → Right Click → Show line numbers
Alternate Option:You can do the same by using the menu options as well: Go to Windows → Preferences → General → Editors → Text Editors, now look for "Show line numbers" checkbox and tick it!
Eclipse Show Line Numbers using Window Menu Option
If you are using macOS you need to go to: Eclipse → Preferences → General → Editors → Text Editors → General → Editors → Text Editors
Note: ⛏️ This is no shortcut keys to do it!
Comments:
- Perfect! :) Worked.. Thanks
user2886 16 Jul 2020 14:07:03 GMT
- Further comments disabled!
More Posts related to Eclipse,
- 300+ Eclipse IDE Keyboard Shortcuts for Mac
- How to Word wrap eclipse console logs width
- [Eclipse] Enable or Disable print margin line
- Syntax error, parameterized types are only available if source level is 1.5 or greater [Java]
- How to Change Eclipse Default Web Browser
- How to run a Maven jar project from eclipse without tomcat
- [Fix] Spring Tool Suite STS Code Autocomplete not working with Eclipse
- eclipse maven m2e : Cannot complete the install
- Installing JD Decompiler plugin in Eclipse IDE
- How to enable line numbers in Eclipse IDE
- Eclipse Error : The Eclipse executable launcher was unable to locate its companion shared library.
- Install Eclipse IDE on M1 Mac Natively
- How to remove unwanted Java imports in IntelliJ (alternative of eclipse Ctrl + Shift + O)
- Word-wrap Eclipse Console logs
- Eclipse Error The JVM Shared Library JavaVirtualMachines does not contain the JNI_CreateJavaVM symbol
- How to switch Eclipse IDE Workspace
- How to Reset Eclipse Theme to Classic
- [Eclipse] Syntax error, annotations are only available if source level is 1.5 or greater
- Java was started but returned exit code=13 [Eclipse]
- How to use Content Assist in Eclipse IDE
- Java Decompiler Eclipse Plugin
- Search text in Eclipse Console logs
- How to Save Eclipse console logs in external log file
- Eclipse version 32-bit or 64-bit check on macOS
- How to display Line Number in Eclipse IDE
More Posts:
- How to create a SharePoint list from an existing list with same columns, views, formatting, data - SharePoint
- Sign in as different user missing in SharePoint 2013, how to enable - SharePoint
- SharePoint An unexpected error has occurred - Correlation ID and PowerShell Merge-SPlogfile - SharePoint
- How to change SharePoint Online site collection or subsite URL address - SharePoint
- Failed to load resource: net::ERR_CACHE_MISS PHP - PHP
- How to install Java 11 on Mac - Java
- Calculate Volume of Sphere - C-Program
- How to check installed Tomcat version - Tomcat