Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I have Centos and Win 7 installed in same PC. How Can I change setting in CentOS to show Windows 7 in top of the list in boot menu ?

share|improve this question

migrated from Aug 9 '12 at 18:47

This question came from our site for professional and enthusiast programmers.

Edit your /boot/grub/grub.conf (or /boot/grub/menu.lst) so that the entry that looks like

title Windows 7

is the topmost of the entries (they all start with title)

You need to either log in as root (su) or use sudo, e.g. sudo <your favourite editor> /etc/boot/menu.lst

share|improve this answer
And how exactly? – Tom Wijsman Aug 9 '12 at 18:48
@Kimvais /boot/grub/grub.conf, when I trying to edit, it is showing, permission denied. so how exctly edit this, plz help .. – Indian Girl Aug 9 '12 at 18:51
@IndianGirl I would try to edit the file like this on ubuntu/debian: sudo vi /boot/grub/grub.conf. Maybe your problem with editing is more complex than that, i don't know. – Ben7005 Aug 9 '12 at 19:07
@Ben7005 now it is working (sudo vi /boot/grub/grub.conf). But I am very new to linux. so plz give me hint that how can I edit this ? means I have to set default=0 to default=1 . plz tell me – Indian Girl Aug 9 '12 at 19:23
Even better, change the default 0 line. – Ben Voigt Aug 9 '12 at 20:05

Thanks to Kimvais for the location of the file, that was most of the answer!

To start, type in sudo vi /boot/grub/grub.conf.

This command works like this:

  • sudo tells Centos that you want to perform the rest of the command with root privileges (so that you can save the file).
  • vi /boot/grub/grub.conf tells Centos to use the vi program to edit /boot/grub/grub.conf.

Now that you are in vi, navigate (using arrow keys or h=left j=up k=down l=right) to the place that you want to edit and change the values that you want.

Now press Ctrl+C, then :wq, then hit Enter.

This works like so:

  • Ctrl+C sets vi to command mode
  • : begins the command
  • w means save
  • q means quit
  • Enter runs the command, saving your file and then exiting vi.
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.