To show lines in the vi or vim text editor, you can enable line numbers by using the following command:
:set number
This will display line numbers in the editor, and you can turn off line numbers by using the following command:
:set nonumber
Alternatively, you can enable line numbers when launching vi or vim by using the following command:
vi -c 'set number' filename
Where filename
is the name of the file you want to edit.