← coderrocketfuel.com

Save File Changes Without Exiting the Nano Editor

How can you save your file changes without exiting the nano editor?

First, use this keyboard shortcut:

CTRL + o

You'll then be prompted for a file name to write to. This tells nano where to save your changes.

Nano Editor Write File Prompt

Press ENTER to write the changes to the already existing file you were making updates to.

Then you can continue making changes to your file or exit nano via the CTRL + x keyboard shortcut.

Thanks for reading and happy coding!