@nixCraft The nl utility skips empty lines & restarts line numbers at the end of logical pages. If the file happens to have a "\:" line in it, nl will confuse its users. A better option for most terminals:
less -N /etc/resolv.conf
There's also the more/less replacement "most", which shows the cursor's line number in the status bar.