how to turn on number lines in nano code example
Example 1: nano with line numbers
nano --linenumbers [filename]
Example 2: display number of lines in nano linux
Press
Alt+#
or
Alt+Shift+3
Example 3: nano add line numbers
according to the man page for nanorc, you can add set linenumbers in ~/.nanorc, /etc/nanorc, $XDG_CONFIG_HOME/nano/nanorc or ~/.config/nano/nanorc.