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,
- How to display hidden files in Eclipse (dot prefixed files)
- Convert existing code project into a git project using Eclipse
- How to enable line numbers in Eclipse IDE
- [Eclipse] Syntax error, annotations are only available if source level is 1.5 or greater
- Enable Spellcheck in eclipse workspace
- How to create a Git Project in Eclipse (Step-by-step)
- [Solution] Spring Tool Suite (STS) support for JSP (JAVA EE)
- How to Remove All Terminated Console tabs at once in Eclipse
- Eclipse Java: Multiple markers at this line error
- Compare Current and Previous Versions of Same File (Local History) in Eclipse
- Eclipse : Workspace was written with an older version of the product and will be updated
- How to Save Eclipse console logs in external log file
- Fix: Eclipse Cant Connect to any repository not Authorized Error GitHub
- How to remove unwanted Java imports in IntelliJ (alternative of eclipse Ctrl + Shift + O)
- How to Configure GitHub with Eclipse IDE in 2023
- How to use Content Assist in Eclipse IDE
- Enable Eclipse dark mode
- Fix: Eclipse Connection time out: github.com
- Java was started but returned exit code=13 [Eclipse]
- Java Decompiler Eclipse Plugin
- Add imports in eclipse shortcut key combinations
- Syntax error, parameterized types are only available if source level is 1.5 or greater [Java]
- [Eclipse] Enable or Disable print margin line
- Eclipse Error The JVM Shared Library JavaVirtualMachines does not contain the JNI_CreateJavaVM symbol
- How to reset Eclipse IDE Code Font
More Posts:
- Change battery percentage in Android Emulator - Android
- Facebook | Error : Sorry, something went wrong We're working on it and we'll get it fixed as soon as we can - Facebook
- Git Remove Untracked Files using Command - Git
- How to Exit a File in Terminal (Bash/Zsh) - Linux
- Notepad++ Replace space with Dot - NotepadPlusPlus
- [Solution] Installing Whatsapp There's insufficient space on the device - WhatsApp
- Java Program to generate random string - Java
- Open VS Code Command Palette using Keyboard Shortcut - Shortcuts