How to change the boot order of a dual-boot Linux PC

Are you dual-booting Linux and Windows? If you'd prefer to have Windows boot up first, we'll show you how.

Wikimedia Commons

Linux is a great operating system, but it can be hard to completely switch over. For this reason, many people prefer to dual-boot Linux with Windows.  The Linux boot loader though (called Grub), usually defaults to booting Linux.  If you'd prefer to have Windows boot up by default, here's how to change it:

Note: The Linux distro we're using for this How To is Ubuntu.


Graphical method

If you're not quite comfortable with the command line yet or just prefer the pretty graphical interface, this is the method for you.

Step 1: We need to install a program called startupmanager by opening the Ubuntu Software Center and installing "startupmanager."

Startupmanager install
Screenshot by Ed Rhee

Step 2: After you've finished installing startupmanager, launch it and enter your user password at the prompt.

Step 3: In the Boot options tab, click on the drop-down menu under Default operating system, then select Windows as your default operating system.

Startupmanager default OS
Screenshot by Ed Rhee

Step 4: When you're finished, click the Close button and you'll see startupmanager finalize the settings.

Startupmanager finalizing
Screenshot by Ed Rhee


Command line method

If you're comfortable with the command line or prefer it, use this method. Just make sure you're also comfortable using a text editor like vi.

Step 1: Open up a terminal window (CTRL+ALT+T).

Step 2: Find the Windows entry number in the boot loader.

Type command:

cat /boot/grub/grub.cfg | grep menuentry

In the screenshot below, you'll see that "Windows 7..." is the fifth entry, but since entries start at 0, the actual entry number is 4.

Get menuentry
Screenshot by Ed Rhee

Step 3: Edit /etc/default/grub

Type command:

sudo vi /etc/default/grub

Change the GRUB_DEFAULT from 0 to 4, then save the file.

Edit grub
Screenshot by Ed Rhee

Step 4: Update the changes into the boot loader.

Type command:

sudo update-grub

That's it. Now you know how to change the boot order of a Linux dual-boot system. If you'd like to see more Linux-related How To articles, let us know in the comments below.

About the author

Ed Rhee, a freelance writer based in the San Francisco Bay Area, is an IT veteran turned stay-at-home-dad of two girls. He focuses on Android devices and applications while maintaining a review blog at techdadreview.com.

 

Join the discussion

Conversation powered by Livefyre

Don't Miss
Hot Products
Trending on CNET

HOT ON CNET

Mac running slow?

Boost your computer with these five useful tips that will clean up the clutter.