Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exit nano in terminal. cmd+X is not working

Tags:

unix

nano

My OS is macOS Catalina.

I open nano version 2.0.6 in the terminal to edit a file. nano first-loop.sh

To exit nano, I have tried Cmd+X and Cmd+SHIFT+X, but none of these two options performs any action.

It is only when I type SHIFT+Esc+X that it reacts. However, most of the times, pressing this would only enable and disable the Help mode. Scarce times when I press this same combination SHIFT+Esc+X is when it asks to save the file: Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?

I wonder why the same command can activate two different actions on this stochastic manner (I have not been able to identify a pattern). I find it absurd that I have to press the same key over and over until it decides to react in the way I expect.

Is there any keyboard combination I can use to be certain I will exit nano?

Many thanks

like image 481
JaraTech Avatar asked Nov 24 '25 20:11

JaraTech


2 Answers

The solution that worked for me to exit nano was ctrl+shift+X

like image 112
MonkeyNation Avatar answered Nov 28 '25 16:11

MonkeyNation


This is indeed a genuine problem. I see the same. CTRL+x does nothing apart from type an x

My fix was it's keyboard related, use the laptop keyb directly and works as expected

like image 32
Ollie Hunt Avatar answered Nov 28 '25 17:11

Ollie Hunt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!