unix

How do I show line numbers in the vi editor?

To display line numbers in the vi editor, you can type this from within vi:

:set number

You can abbreviate it : set nu

To remove the line numbers you can type:

:set nonu

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top