How do I print line numbers in Unix?

How do I print line numbers in Unix?
Answer
To activate the line numbering, set the number flag:
  1. Press the Esc key to switch to command mode.
  2. Press : (colon) and the cursor will move at the bottom left corner of the screen. Type set number or set nu and hit Enter . :set number.
  3. Line numbers will be displayed at the left side of the screen:
 

Tìm kiếm

Back
Top