How to exit from nano command

nano is a simple text editor in the style of the Alpine Composer most commonly used as an alternative for Vi Editor.

To exit the nano command you need to first press Control + X keys, you will be displayed with a question at the bottom of the screen,

Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES)? 

If you want to same and exit the changes to the file, press key Y, else press N to exit without saving.

Exit nano command

Try Out Code2care Dev Tools:


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.