How to Install nano Text Editor on Mac Again
If you have attempted to use nano at the command line on MacOS recently, you may have noticed that the pico text editor is launched instead, via a symlink for /usr/bin/nano to pico. This is because the latest versions of MacOS remove the nano text editor from the command line for whatever reason, and instead have replaced nano with pico.
If you prefer to use the nano text editor, you can get nano back in the command line by installing it manually yourself.
The simplest way to install the nano text editor on MacOS is to use Homebrew.
How to Install nano Text Editor on MacOS
If you don’t have Homebrew installed yet, you will need to do that first. Homebrew is easy to install on the Mac and offers simple package management and an abundance of command line tools, apps, and utilities that are familiar to many Unix and Linux users.
Assuming you have Homebrew installed, installing nano on the Mac is super simple.
From the Terminal, type the following syntax:
brew install nano
Once nano has finished installing, you can launch nano as usual from the command line with:
And away you go, you’re back to using the nano text editor at the command line.
The replacement of nano with pico by default arrived with macOS 12.3 and onward, where you will also find that Python 2 was removed, but you can make Python 3 the default on the Mac if desired. While the precise reasons for these changes are unclear, speculation online suggests it may be to get away from GNU licensing issues, or potential security issues. Fortunately thanks to Homebrew, it’s simple to add and replace any deprecated or missing command line tools you may be familiar with and use as part of your workflow, whether it’s nano, python, or anything else.
For what it’s worth, nano is based on pico, so many users won’t even notice the difference between the two text editors, since the commands, keystrokes, interface, etc are the same too, but nano allows for some customizations that pico does not offer.
Did you notice that nano was quietly replaced by pico? Did you replace and install nano, or are you going to stick with pico, or choose something totally different like emacs or vim?
Two big reasons why I immediately replaced Pico with Nano on my Mac OS (MacBook):
* No Control-S shortcut to save immediately. I have to press Control-O and confirm file name.
* Pasting long lines breaks them into shorter lines with carriage returns. ABSOLUTE NO-NO for a software developer like me. This was TOTALLY unexpected and screws up code pastes, rendering code files useless. Apparently there’s no way to even set an environment variable to disable this, and why this is the default is baffling. You have to alias pico to pico -w to fix this. Nah, I’d rather get nano.
Say no to Pico. Apple, please upgrade to Nano!
Very strange !
Apple is very very strange !
With High-Sierra, /usr/bin/pico is a symbolic link for nano…
And with the following versions, it is the reverse :
/usr/bin/nano is a symbolic link for pico…
Why this two utilities are not installed ?
What is the problem ?
I installed nano using homebrew as instructed but when I try to start nano, it still starts pico instead. I am on v12.3 Monterrey
You may need to refresh the terminal session or open a new session for the path to update. I just ran through the same steps myself and with a new terminal window nano launches nano as expected.
I ran into the same issue. Working perfectly after restarting the terminal session.
Starting a new terminal session did not help, still stuck with pico.
It’s really nice (NOT) for apple to have set up python to be a link to python2.7(itself a link pythonwrapper ) and “protect” it from changes from a mere superuser preventing site tailoring of using python3 by default when python is requested.
Use a virtual environment.
vim for me, thanks.