How to save a file in Nano Editor and Exit

If you are working on a file using Nano Editor and want to know how to save a file, follow the below steps and screenshots.

Step 1: Press Control + X to Exit

^X Exit

Step 1 - Press Control + X to Exit Nano

Step 2: Now if you want to save and exit press Y else N

Save modified buffer? Y/N

Step 2- Now if you want to save and exit press Y else N

Step 3: You can edit the filename to write (optional) and press Enter to Exit

File Name to Write: myfile.txt

Step 3 - Change filename if required or press enter to exit

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!