Page 1 of 1

Nano Exiting and Saving

Posted: Tue Apr 16, 2013 2:58 am
by jswe
I am editing my Sudoers file and I want to quit it and return to the command prompt. I do ^x to save and exit and I am left with some choices. I have no clue what they are, what to choose or what to do.
My choices are ^G Get help ^C Cancel M-D DOS Format M-M Mac Format M-A Apprend M-P Prepend and M-B Backup file. Any help would be nice! :D

Re: Nano Exiting and Saving

Posted: Tue Apr 16, 2013 7:48 am
by FTrevorGowen
IIRC the sudoers file should be edited via "visudo" ie: "sudo visudo". Whilst this may use nano as the editor the options presented after "Ctrl-X" should be different to what you're seeing.
Trev.

Re: Nano Exiting and Saving

Posted: Tue Apr 16, 2013 5:58 pm
by SiriusHardware
jswe wrote:I am editing my Sudoers file and I want to quit it and return to the command prompt. I do ^x to save and exit and I am left with some choices. I have no clue what they are, what to choose or what to do.
My choices are ^G Get help ^C Cancel M-D DOS Format M-M Mac Format M-A Apprend M-P Prepend and M-B Backup file. Any help would be nice! :D
I use Nano to edit sudoers.

I only ever use two CTRL commands when I'm doing that.

Make your way to where the sudoers file is

sudo nano sudoers <enter>

-Edit the file as you want it.

Hit 'CTRL-O' (to 'write Out' the file). You'll see that there is a black bar near the bottom of the Nano screen saying 'file name to write: sudoers'. Press <enter> to accept that filename.

You have now saved the modified file, so if you now hit CTRL-X, Nano will exit straight to the command line without asking you any further questions.