Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I noticed while working on my site through nano/terminal that ubuntu creates weird ~ files.

I've index.php~ etc.

I imagine this are backup files? is this correct? why does it do this? and how do I get rid of this functionality?

share|improve this question
And related, if you already have a bunch of those backup files laying around and want to remove them all automatically from the terminal, see How do I remove hidden backup files? –  IQAndreas Nov 11 '13 at 1:29

2 Answers 2

up vote 5 down vote accepted

Yes, those are backup files, most Unix editors do that. You can disable them with:

unset backup

in your ~/.nanorc. See man nanorc for more information.

share|improve this answer
This will only deactivate it for the nano editor.. Don't be surprised if files with that ending will still be created - by other applications. –  alfonx Oct 16 '11 at 14:59
so how do I disable it systemwide? –  Sandro Dzneladze Oct 16 '11 at 15:09
Why do you want to disable it systemwide? It seems like a good practice to me. –  bbaja42 Oct 16 '11 at 15:22
it doesn't function correctly anyways. Right now index.php~ and index.php have same content - even though I edited out the main file. –  Sandro Dzneladze Oct 16 '11 at 16:32

If you use GEdit (Ubuntu's default non-terminal text editor, and usually just shows up as named Text Editor), by default it also creates such backup files. To disable them, open the Tools > Preferences menu, switch to the Editor tab, and uncheck the "Create a backup copy of files before saving" checkbox.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.