Hello'
How do you save and close nano?
Thank You
Hello'
How do you save and close nano?
Thank You
ctrl + o to save
ctrl + x to close
Don't eff with The Cult...
The commands are listed on the nano interface itself. Look at the lower part of the screen.
If you just want to save on close ctrl + x is all you'll need.
when you do that, it's first ask to save the modified file, click y and enter and then it'll ask for a filename.
If you've opened an existing file, then the name should be listed, if so, just click enter, and you'll exit nano.
Last edited by deadflowr; August 23rd, 2013 at 04:54 AM.
Splat Double Splat Triple Splat
Earn Your Keep
Don't mind me, I'm only passing through.
Once in a blue moon, I'm actually helpful.
Do not forget to save the original and unmodified file with another name if you are editing config files.
| My old and mostly abandoned blog |
Linux user #413984 ; Ubuntu user #178
J'aime les fraises.
Nighty night me lovelies!
| Reinstalling Ubuntu ? Please check this bug first ! |
| Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
| No support requests / username changes by PM, thanks. |[SIGPIC][/SIGPIC]
That is excellent advice. Also, If you look at /etc/nanorc, you'll see that there's a provision to keep a backup file
This file uses "#" at the start of a line to comment out options. So, if, in your version of /etc/nanorc, the second line is commented out, open the file (after making a copy of the original with a useful alternate name) usingCode:## Backup files to filename~. set backupWhile saving the original is obviously essential, the backup procedure described above will keep just a single backup of subsequent edits.Code:sudo nano /etc/nanorc
That's why I prefer to use gedit as my text editor with the doublesave plugin. This way, each and every version of files I modify is saved with a unique timestamp in case I want to go back a few or more versions.
I should mention that most of the files I edit are in my home folder and are not system files.
Or open nano with the -B switch
If you are doing several edits on the same file, vasa1's method works best (thanks, I did not know that).Code:-B (--backup) When saving a file, back up the previous version of it to the current filename suffixed with a ~.
If editing config files out of /home, nano should be opened with sudo. You can save the original file to your /home for backup or within the system files. In the later case, files may get written over.
| My old and mostly abandoned blog |
Linux user #413984 ; Ubuntu user #178
J'aime les fraises.
Nighty night me lovelies!
| Reinstalling Ubuntu ? Please check this bug first ! |
| Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
| No support requests / username changes by PM, thanks. |[SIGPIC][/SIGPIC]
Bookmarks