Is there a way to tell nano to automatically show line numbering each time I open a file?
The keyboard combination to display the current line number whilst you are using nano is CTRL+C.
Alternatively, to display the line & column number position you could just use the
-c parameter when launching nano i.e:
nano -c [filename]
To make this permanent,
nano uses a configuration in your home folder
Thus to display line numbers always when using nano...
(don't worry if its empty - this file doesn't exist by default)
N.B. the deprecated syntax
set const is shown in the animation
Since you are using line numbers remember you can use ALT+G to jump to a specific line number.
Accidentally found nice shortcut: Alt + Shift + 3.
Compile Nano from source:
git clone git://git.savannah.gnu.org/nano.git;cd nano;./autogen.sh;./configure;sudo make install
Then add the following to your
You can use Meta+# to turn line numbers on and off from within Nano.
nano -c filename does not work, use
nano filename then Ctrl +_. It will ask you for the line number to go to.
If you have already opened the file with nano you press
(not simultaneusly, press control and w, then without letting go control and letting go w, press t)
This command will require column and line, you enter them this way:
and you will end up in line 10 character 23.
If you are at the top of the file and you only want to find the line:
Ctrl+w+t and then 10
If you are at a acertain line and you want to find the column:
Ctrl+w+t and then ,23
If you haven't opened the file yet, you can do this:
nano +10,23 file (enter)
and the file will open with cursor in the line 10, chanracter 23, so you can try also:
nano +10 file (enter)
nano +,23 file (enter) (Note that this will send you to the character 23 of the first line only)
protected by Community♦ Mar 9 '18 at 11:33
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?