Skip to content
TrySitePrice

less Command Display Line Numbers

Best/Tutorial

To display line numbers while using the less command, you can add the

-
option when running the less command:

less -N file.txt

In this example, the

-
option causes less to display line numbers in front of each line of the file. This can be useful when you need to refer to specific lines in a file.