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