To show line numbers in nano, and they are as follows:
Method 1:
You can directly use the following command to display line numbers in Nano:
nano –linenumbers [filename]
As below:
nano --linenumbers testfile.txt
Method 2:
You can press Alt +Shift + 3 key combinations to display line numbers quickly.
Method 3:
You can use CTRL + C to display the current line number.
Also, to display the line & column number, you could just add the -c
parameter when running nano editor:
nano -c [filename]
As below:
nano -c testfile.txt