$ nano -l /etc/hosts 1 127.0.0.1 localhost 2 127.0.0.1 vm2 3
In ~/.nanorc config file:-
set linenumbers