This question already has an answer here:

I'd like the line numbers to show automatically whenever I use nano. I've seen the set const command in ~/.nanorc but I want to see the line numbers in the column to the left, activated by meta-# within nano. Is there a way to automatically use meta-# whenever I use nano without having to do it myself?


marked as duplicate by don_crissti, Jeff Schaller, Stephen Rauch, G-Man, Satō Katsura Oct 5 '17 at 4:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I don't have the latest version but browsing through the sources online shows that M-# is setting an option called linenumbers, and indeed this is described in the new man page for nanorc:

set linenumbers

    Display line numbers to the left of the text area.

There is also a command line -l or --linenumbers option.

Not the answer you're looking for? Browse other questions tagged or ask your own question.