I use nano as my favorite text editor.

I was able to save my documents by pressing F3 + Enter.

But is there a way to save the document directly by pressing some key, if I'm sure I would like to save the document to the same name as before?

2 Answers 2


You can try:

  • Edit your .nanorc file
  • Add line: set tempfile

Now, after you finish editting your file, just press Ctrl + X, nano then quit and automatically save your file.


Referenced from : Wiki Saving and exiting

If you want to save the changes you've made, press Ctrl + O. To exit nano, type Ctrl + X. If you ask nano to exit from a modified file, it will ask you if you want to save it. Just press n in case you don't, or y in case you do. It will then ask you for a filename. Just type it in and press Enter.

If you accidentally confirmed that you want to save the file, but you actually don't, you can always cancel by pressing Ctrl + C when you're prompted for a filename.

  • Ctrl-O is equivalent to F3 and they both prompt to confirm the filename. My understanding of the question is that novice wishes to avoid this prompt for confirming the filename.
    – damien
    Jul 7, 2014 at 8:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .