Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I break the xorg.conf file and I can't startup Ubuntu 12.04. How do I revert back to a backup xorg.conf file called xorg.conf.backup?

share|improve this question

you can restore it normally by booting to the recovery mode then coping over the other file

cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf

then restart and it should load the new xorg.conf

if it just boots to the shell you should be able to do this but you will need to use sudo.

share|improve this answer
I tried that but I got a message saying that it's read-only. I used sudo too. – oshirowanen May 3 '12 at 21:33
up vote 1 down vote accepted

Figured it out.

  1. I had to boot into safe mode

  2. Click on the root command line option

  3. At the command line I typed: fsck to get the disk mount path

  4. Mounted the disk using the command mount -o remount <mount path from fsck goes here>

  5. Then I used cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf to restore the backup

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.