How to show line numbers in Nano on Mac

td;lr: On GNU Nano press escape key followed by key n on your Mac to show line numbers.

If you want to display the line numbers at the left-hand side gutter area in Nano editor on the Mac, then you can make use of the Keyboard Command: Esc + n

If for some reason you do not see any line numbers on the file, then you need to be aware that this does not work with the default Nano editor that is available with macOS. You will need to get the GNU version of Nano, you can get it using homebrew.

Install GNU Nano:
brew install nano

Also make sure to add the path to your .zshrc profile file, else you might be again using the default nano editor.


Note: The path may vary based on your Mac CPU type M1/M2 or Intel.

Show line numbers in Nano on macOS

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap