rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

How to save and exit sudo nano?

Thu Aug 14, 2014 7:57 pm

How to save and exit sudo nano? I have tried control -x and control -Y but they do not work! Please help!
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

User avatar
gadgethome
Posts: 69
Joined: Mon Mar 04, 2013 2:45 pm

Re: How to save and exit sudo nano?

Thu Aug 14, 2014 8:18 pm

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.

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: How to save and exit sudo nano?

Thu Aug 14, 2014 8:18 pm

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

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: How to save and exit sudo nano?

Fri Aug 15, 2014 7:07 pm

When I do that all it states is (invalid line or column number).
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: How to save and exit sudo nano?

Fri Aug 15, 2014 8:22 pm

Hello,

Show us what you type when you start nano.

Regards

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: How to save and exit sudo nano?

Fri Aug 15, 2014 8:35 pm

Control - then a white bar comes up then I type X. Then I do the same thing but with Y
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: How to save and exit sudo nano?

Fri Aug 15, 2014 8:47 pm

Hello,

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

sudo nano (then what)

Regards

klricks
Posts: 6614
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: How to save and exit sudo nano?

Sat Aug 16, 2014 4:16 am

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 ........
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
jojopi
Posts: 3085
Joined: Tue Oct 11, 2011 8:38 pm

Re: How to save and exit sudo nano?

Sat Aug 16, 2014 5:05 am

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.)

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: How to save and exit sudo nano?

Sat Aug 16, 2014 7:14 am

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.)

User avatar
Cancelor
Posts: 757
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: How to save and exit sudo nano?

Sat Aug 16, 2014 7:15 am

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
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: How to save and exit sudo nano?

Sat Aug 16, 2014 8:08 am

Welcome to the phone and tablet generation, they haven't a clue about things like Ctrl keys.......
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: How to save and exit sudo nano?

Sat Aug 16, 2014 12:04 pm

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?
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

klricks
Posts: 6614
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: How to save and exit sudo nano?

Sat Aug 16, 2014 1:04 pm

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
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

klricks
Posts: 6614
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: How to save and exit sudo nano?

Sat Aug 16, 2014 1:10 pm

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.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
Cancelor
Posts: 757
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: How to save and exit sudo nano?

Sat Aug 16, 2014 2:00 pm

I REALLY DON'T SEE WHY, IT'S JUST BLACK WRITING ON A WHITE BACKGROUND. :twisted:
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

Return to “General discussion”