Is there a way to tell nano to automatically show line numbering each time I open a file?
Ubuntu – How to show line numbering in nano when opening a file
nano
nano
Is there a way to tell nano to automatically show line numbering each time I open a file?
Best Answer
According to the man page for GNU nano 2.9.3, you can use the
-l
or--linenumbers
flags.Alternatively, according to the man page for nanorc, you can add
set linenumbers
in~/.nanorc
,$XDG_CONFIG_HOME/nano/nanorc
or~/.config/nano/nanorc
.Edit
In response to comments about alternate config files, from the description of
man nanorc
:I would not typically advise others to change the system-wide config file, unless you have a good reason to do so, as it will likely be overwritten during any updates, and is not likely to be included in system backups, which typically only include the home directory.