Page 1 of 1

How to save and exit sudo nano?

Posted: Thu Aug 14, 2014 7:57 pm
by rpiswag
How to save and exit sudo nano? I have tried control -x and control -Y but they do not work! Please help!

Re: How to save and exit sudo nano?

Posted: Thu Aug 14, 2014 8:18 pm
by gadgethome
I usually do Ctrl-O then press enter to save the file and then Ctrl-X to quit. Or Ctrl-X and then Y to save the changes.

Re: How to save and exit sudo nano?

Posted: Thu Aug 14, 2014 8:18 pm
by mad-hatter
Hello,

man nano
Gives you all the instructions.

When nano is up & running, make your changes.
Then ctrl + o then return/enter to save.
Then ctrl + x to close.

Regards

Re: How to save and exit sudo nano?

Posted: Fri Aug 15, 2014 7:07 pm
by rpiswag
When I do that all it states is (invalid line or column number).

Re: How to save and exit sudo nano?

Posted: Fri Aug 15, 2014 8:22 pm
by mad-hatter
Hello,

Show us what you type when you start nano.

Regards

Re: How to save and exit sudo nano?

Posted: Fri Aug 15, 2014 8:35 pm
by rpiswag
Control - then a white bar comes up then I type X. Then I do the same thing but with Y

Re: How to save and exit sudo nano?

Posted: Fri Aug 15, 2014 8:47 pm
by mad-hatter
Hello,

What I mean is what do yo enter to start nano running?

sudo nano (then what)

Regards

Re: How to save and exit sudo nano?

Posted: Sat Aug 16, 2014 4:16 am
by klricks
rpiswag wrote:Control - then a white bar comes up then I type X. Then I do the same thing but with Y
That happens when you have [Caps Lock] on.

Is there a more useless key on the keyboard? No...... the CL is it. Pry the CL key off and superglue the plunger ........

Re: How to save and exit sudo nano?

Posted: Sat Aug 16, 2014 5:05 am
by jojopi
rpiswag wrote:Control - then a white bar comes up then I type X. Then I do the same thing but with Y
^X or Ctrl-X or Ctrl+X or C-x all mean to hold Ctrl and press X. You are holding Ctrl and pressing minus/underscore, which gives ^_, the command for "Go to line and column number".

If you get a Yes/No question after pressing ^X, you must answer with Y or N (or ^C to cancel), not ^Y or ^N.

(The other convention you may see in nano documentation is M-X for "meta X". That means to hold Alt and press X. Or, if your keyboard has no Alt key, press Escape then X.)
klricks wrote:That happens when you have [Caps Lock] on.
Control characters are not case sensitive. There is no difference between Ctrl-X and Ctrl-x, at least in a terminal. I do not see that having CapsLock on causes any problem controlling nano.

(There are 32 control characters in ASCII: ^@ ^A…^Z ^[ ^\ ^] ^^ ^_. Sometimes ^? is used to mean DEL.)

Re: How to save and exit sudo nano?

Posted: Sat Aug 16, 2014 7:14 am
by Jessie
klricks wrote:
rpiswag wrote:Control - then a white bar comes up then I type X. Then I do the same thing but with Y
That happens when you have [Caps Lock] on.

Is there a more useless key on the keyboard? No...... the CL is it. Pry the CL key off and superglue the plunger ........
Once you can hit Caps Lock with your pinky without even thinking about it you will realize its usefulness. Anytime I type in an acronym 3 letters or better I use the CL. Beats the hell out of holding shift for that long. I guess maybe it comes from over 20 years of typing on a PC KB? After CL becomes second nature you will find its use, but then again with all this new tech maybe touch typing will go out with cursive handwriting (talk about a useless skill I had to learn in school.)

Re: How to save and exit sudo nano?

Posted: Sat Aug 16, 2014 7:15 am
by Cancelor
Ctrl-x is the same as saying ....

Press and hold down the key on your keyboard labelled Ctrl
while still holding the Ctrl key down press and release the key on your keyboard labelled X
finally release all keys

Re: How to save and exit sudo nano?

Posted: Sat Aug 16, 2014 8:08 am
by pluggy
Welcome to the phone and tablet generation, they haven't a clue about things like Ctrl keys.......

Re: How to save and exit sudo nano?

Posted: Sat Aug 16, 2014 12:04 pm
by rpiswag
Unfortunately you are right. Tables and phone where not designed to be standalone computers. More people should learn to program and make something and be proud not just waste there time playing video games. What has the world come to?

Re: How to save and exit sudo nano?

Posted: Sat Aug 16, 2014 1:04 pm
by klricks
jojopi wrote:
rpiswag wrote:...
...
klricks wrote:That happens when you have [Caps Lock] on.
Control characters are not case sensitive. There is no difference between Ctrl-X and Ctrl-x, at least in a terminal. I do not see that having CapsLock on causes any problem controlling them.
You are right, I accidentally hit [ctrl] c when I meant to hit [ctrl] x

Re: How to save and exit sudo nano?

Posted: Sat Aug 16, 2014 1:10 pm
by klricks
Jessie wrote:
klricks wrote:
rpiswag wrote:Control - then a white bar comes up then I type X. Then I do the same thing but with Y
That happens when you have [Caps Lock] on.

Is there a more useless key on the keyboard? No...... the CL is it. Pry the CL key off and superglue the plunger ........
Once you can hit Caps Lock with your pinky without even thinking about it you will realize its usefulness. Anytime I type in an acronym 3 letters or better I use the CL. Beats the hell out of holding shift for that long. I guess maybe it comes from over 20 years of typing on a PC KB? After CL becomes second nature you will find its use, but then again with all this new tech maybe touch typing will go out with cursive handwriting (talk about a useless skill I had to learn in school.)
I learned to type on a manual typewriter with the shift lock half key thing. What it is that really bothers me is people who type long messages in all caps.

Re: How to save and exit sudo nano?

Posted: Sat Aug 16, 2014 2:00 pm
by Cancelor
I REALLY DON'T SEE WHY, IT'S JUST BLACK WRITING ON A WHITE BACKGROUND. :twisted: