jswe
Posts: 1
Joined: Tue Apr 16, 2013 2:54 am

Nano Exiting and Saving

Tue Apr 16, 2013 2:58 am

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

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Nano Exiting and Saving

Tue Apr 16, 2013 7:48 am

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.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

SiriusHardware
Posts: 503
Joined: Thu Aug 02, 2012 9:09 pm
Location: UK

Re: Nano Exiting and Saving

Tue Apr 16, 2013 5:58 pm

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.

Return to “Beginners”