Error reading /home/user/.nano_history: Permission denied Press Enter to continue starting nano.

Sometimes when trying to edit a text file using "nano" we face a not so important but yes annoying error message saying that  there is an error reading the file .nano_history from the current user home directory. Just by hitting the enter key it will proceed to the next step. But we want to fix this so the problem gets fixed so the next time we want to edit anything we  don't face this kind of issue any more.
Error reading /home/user/.nano_history: Permission denied
Press Enter to continue starting nano.
Don't panic, the error has a quick fix.
Run as root or sudo the following command:
sudo chmod 755 /home/<username>/.nano_history
Put the correct password at the prompt, and you are done!

Nano is a gui less text editor, it is perfect for text editting when there is no X session active, or maybe when you can't start your X right.

Most used commands with nano:

CTRL+O - Saves the file you are editting.
CTRL+K - Cuts the line where the cursor is.
CTRL+W - Searches a string inside the text file.
CTRL+T - Text correction
CTRL+X - Quits after saving if not saved there will be a question.


  1. I can confirm that this works with Ubuntu 14.04. I saw another web page that recommended that .nano_history file be deleted and that a config file for nano be altered to stop nano from recording it's history. To me, this didn't seem like the best solution (up to the user to decide I guess).

    After performing the prescribed actions on this web page, I tested both 'nano fileName' and 'sudo nano fileName' and the error no longer appears.


    1. I saw the same page and thought it was really stupid to give that as an example and did a little more searching and found this site which didn't require me to disable a feature

    2. thanks for your comment.

    3. thanks for your comment.

  2. This comment has been removed by the author.