Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to print the line numbers along with c source-code in the text editor "Gedit". I am tired to look all day at the display.

Thank you for any time or effort.

share|improve this question
up vote 11 down vote accepted
  1. Open the Print... menu from the File tab


  2. Select the 3º tab called "Text Editor"

  3. Click the second option "Print line numbers" so this checkbox remains enabled


Now you can choice Print Preview and you will see the line numbers before print it:


share|improve this answer

In the edit menu click on preferences and in the in the first tab "View" tick the check box labeled display line numbers

share|improve this answer
I can see the line numbers in gedit but when I print the document there is no line numbers – Ioannis Papaioannou Apr 2 '13 at 18:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.